Force feedback system including multi-Tasking graphical host environment and interface device

ABSTRACT

A force feedback system provides components for use in a force feedback system including a host computer and a force feedback interface device. An architecture for a host computer allows multi-tasking application programs to interface with the force feedback device without conflicts. One embodiment of a force feedback device provides both relative position reporting and absolute position reporting to allow great flexibility. A different device embodiment provides relative position reporting device allowing maximum compatibility with existing software. Information such as ballistic parameters and screen size sent from the host to the force feedback device allow accurate mouse positions and cursor positions to be determined in the force feedback environment. Force feedback effects and structures are further described, such as events and enclosures.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of pending U.S. application Ser. No.11/504,131 filed Aug. 14, 2006 which is a continuation of U.S.application Ser. No. 09/974,197 filed on Oct. 9, 2001, which is acontinuation of U.S. application Ser. No. 08/970,953, filed Nov. 14,1997, now U.S. Pat. No. 6,300,936, issued on Oct. 9, 2001, and entitled“Force Feedback System Including Multi-Tasking Graphical HostEnvironment and Interface Device”, in the names of the same inventorsand commonly owned herewith.

STATEMENT OF GOVERNMENT RIGHTS

One or more embodiments were made with Government support under ContractNumber F41624-96-C-6029, awarded by the Department of Defense. TheGovernment has certain rights in one or more of these embodiments.

BACKGROUND

The present system and method relates generally to interface devices forallowing humans to interface with computer systems, and moreparticularly to computer interface devices that allow the user toprovide input to computer systems and provide force feedback to theuser.

Computer systems are used extensively to implement many applications,such as word processing, data management, simulations, games, and othertasks. A computer system typically displays a visual environment to auser on a display screen or other visual output device. Users caninteract with the displayed environment to perform functions on thecomputer, play a game, experience a simulated environment, use acomputer aided design (CAD) system, etc. One visual environment that isparticularly common is a graphical user interface (GUI). GUI's presentvisual images which describe various graphical metaphors of a program oroperating system implemented on the computer. Common operating systemsusing GUI's include the Windows™ operating system from MicrosoftCorporation and the MacOS operating system from Apple Computer, Inc. Theuser typically moves a displayed, user-controlled graphical object, suchas a cursor or pointer, across a computer screen and onto otherdisplayed graphical objects or predefined screen regions, and theninputs a command to execute a given selection or operation. The objectsor regions (“targets”) can include, for example, icons, windows,pull-down menus, buttons, and scroll bars. Most GUI's are currently2-dimensional as displayed on a computer screen; however, threedimensional (3-D) GUI's that present simulated 3-D environments on a 2-Dscreen can also be provided. Other programs or environments that mayprovide user-controlled graphical objects such as a cursor or a “view”controlled by the user include graphical “web pages” or otherenvironments offered on the World Wide Web of the Internet, CADprograms, video games, virtual reality simulations, etc.

The user interaction with and manipulation of the computer environmentis achieved using any of a variety of types of human-computer interfacedevices that are connected to the computer system controlling thedisplayed environment. In most systems, the computer updates theenvironment in response to the user's manipulation of auser-manipulatable physical object (“user object”) that is included inthe interface device, such as a mouse, joystick, etc. The computerprovides feedback to the user utilizing the display screen. A computermouse is a common user object used to interact with a GUI or othergraphical environment. A mouse (and other mouse-type devices such as atrack ball) is typically used as a position control device in whichdisplacement of the mouse in a planar workspace (e.g. on a mouse pad) isdirectly correlated to displacement of the user-controlled graphicalobject, such as a cursor, displayed on the screen.

Force feedback interface devices allow a user to experience forces onthe manipulated user object based on interactions and events within thedisplayed graphical environment. Typically, computer-controlledactuators are used to output forces on the user object in provideddegrees of freedom to simulate various sensations, such as anobstruction force when moving the cursor into a wall, a damping force toresist motion of the cursor, and a spring force to bias the cursor tomove back toward a starting position of the spring. Force feedbackdevices can be implemented in many forms, such as a joystick, mouse,steering wheel, etc.

When implementing force feedback sensations in a GUI of an operatingsystem, several problems can arise. One problem is the use of forcefeedback when multiple application programs are simultaneously runningin a multi-tasking environment on the host computer. Most operatingsystems allow such multi-tasking, for example, to allow a user tointeract with one application while one or more applications are alsorunning, receiving data, outputting data, or performing other tasks. Forexample, in the Windows™ operating system, one application is the“active” application that typically displays an active window in theGUI. The user can manipulate the functions of the active applicationusing the cursor. Other inactive applications are also running and mayhave inactive windows displayed in the GUI. The user can switch to adifferent application by clicking the cursor in an inactive window, forexample, which causes the new application to be the active applicationand the formerly active application to become inactive.

Each application run by an operating system may have its own set offorce sensations that it needs to command to the force feedback device.Thus, one application may need to command spring, force, vibration, andtexture force sensations, while a different application may need tocommand spring, damper, and jolt force sensations. The force feedbackdevice typically cannot store all possible force sensations for eachapplication running in the operating system, so there is a problem ofwhich force sensations the force feedback device should store andimplement at any one time. In addition, if two of the multi-taskingapplications command conflicting force sensations, the force feedbackdevice needs to choose one of the force sensations to output, and therecurrently is no system or method of doing so.

A different problem occurs when using a force feedback device with aGUI. Traditional mouse controllers used with GUI's are relative positionreporting devices, i.e., they report only changes in position of themouse to the host computer, which the host computer uses to calculate anew position for the cursor on the screen. Many force feedback devices,in contrast, are typically absolute position reporting devices whichreport an absolute position of the cursor, such as screen coordinates,to the host computer. This is because the force feedback device needs toknow the cursor position to accurately determine when forces are to beapplied and to accurately calculate the forces. However, it would bedesirable in some instances to have a relative position reporting forcefeedback device, since the host computer is standardized to receive andinterpret relative positions at the most basic level. Furthermore, sucha relative device would permit the host computer to perform neededadjustments to cursor position, such as ballistics calculations whichmodify cursor position based on mouse velocity to provide enhancedcontrol. If the host computer performs such adjustments, the forcefeedback device processors are relieved of computational burden. Inaddition, some types of interface devices such as trackballs are bettersuited to relative position reporting since an absolute, limitedworkspace is not easily defined for these devices.

Another problem occurs when force feedback is implemented with a GUI orother graphical environment and the graphical environment changesresolution or aspect ratio. For example, if a resolution of 640×480 isbeing displayed by the host computer on a screen, the force feedbackdevice assumes that graphical objects in the GUI have a sizeproportional to screen dimensions and outputs forces accordingly.However, when the resolution is changed, the objects displayed on thescreen change size in proportion to the screen dimensions. The forcefeedback device continues to check for conditions and generate forces asif the old resolution were active, resulting in forces that do notcorrelate with displayed interactions on the screen. The aspect ratio ofa display screen can also change, e.g., when two screens are used toprovide double the amount of displayed area in the GUI, the aspect ratiodoubles in one dimension. Using prior art force feedback devices, forcescan become distorted from such an aspect ratio change. For example, acircle object displayed on the screen may have forces at its bordersthat feel like an ellipse to the user of the interface device, since theaspect ratios of the screen and the mouse workspace are different.

Overview

An embodiment is directed to a force feedback system and architecturewhich allow control of a force feedback device in a multi-taskinggraphical host environment. In addition, force feedback deviceembodiments are disclosed which provide for relative position reportingand absolute position reporting to the host computer.

More specifically, a method interfaces a multi-tasking graphicalenvironment implemented on a host computer with a force feedbackinterface device coupled to the host computer, where multipleapplication programs may run in the multi-tasking environment. A contextin created for association with each application program running in themulti-tasking graphical environment. Force effect commands are receivedfrom the application programs, where the force effect commands commandthe force feedback interface device to output a force effect specifiedby the command. The force effect commands are stored into the contexts.Each context is associated with one of the application programs runningon the host computer, and each force effect command is stored in acontext associated with the application program that sent the forceeffect command. The force effect commands in the context of a particularapplication program are sent to the force feedback device when thatparticular application program is active in the multi-taskingenvironment. Preferably, the force effect commands in contexts ofinactive application programs are not sent to the force feedback device.Thus, only the active application program may command forces on theforce feedback device.

When the application program becomes inactive and a new applicationprogram becomes active, new force effect commands are sent to the forcefeedback device to replace the force effect commands of the formerlyactive application. Preferably, a background application is providedwhich also provides force effects to the force feedback device and mayoutput forces on the device even when not active. Events are alsoprovided which allow a graphical action such as an interaction of thecursor in the graphical environment with another object to cause anevent notification to be sent to the application program. Preferably,only the active and background application programs may receive events.

In another aspect, a force feedback device, such as a force feedbackmouse, provides relative positions to a host when force feedback is notenabled, and provides absolute positions to the host when force feedbackis enabled. Sensor data is read and a position of a user manipulandum ina device frame is determined. A device delta position of themanipulandum includes the change in position of the manipulandum from aprevious position and is reported to the host computer when the hostcomputer is not enabled to receive an absolute screen position of thecursor from the force feedback device. When the host computer is enabledto receive the cursor screen position, the screen position is determinedfrom the device delta position and is reported to the host computer toallow said host computer to display the cursor in the screen frame atthe screen position. A scaled position or “ballistic position” of themanipulandum related to the screen position of the cursor is used indetermining a force to be output by actuators of the force feedbackdevice. Preferably, the scaled position is determined from the deltaposition and the screen position of said cursor is determined based onthe scaled position. Ballistic parameters and screen size of the hostdisplay screen can be received from the host computer to determine thescaled position and screen position.

In another aspect, a force feedback device, such as a force feedbackmouse, provides only relative positions to a host computer. A localmicroprocessor on the force feedback device determines a delta positionof the manipulandum that includes the change in position of themanipulandum from a previous position, and the delta position isreported to the host. A screen position of the cursor is modeled fromthe delta position and the modeled screen position is used in thedetermination of a force output by actuators of the device. An actualscreen position of the cursor is received from the host computer and themodeled screen position is corrected based on the actual screenposition. Preferably, the modeled screen position is correctedincrementally over time to smooth out the correction and reduce aperception of the error correction by the user. Preferably, both thehost and the device adjust the screen position using a ballisticsalgorithm. The host also preferably sends ballistic parameters andscreen size to the device to allow accurate modeling of the screenposition.

In another aspect, a force feedback device reads sensor data anddetermines a position of a user manipulandum in a workspace of thedevice. A position of the manipulandum is reported to the host computerso that the host can display the cursor in a graphical environment.Information is received from the host computer describing a currentscreen size of the display screen of the host computer, where thecurrent screen size is included in a determination of the positionreported to the host.

Also described herein are several force feedback sensations andstructures, including enclosures, textures, and grids. For example, anenclosure is a rectangular or elliptical shape having walls that provideforces to an associated graphical object such as an icon or window. Theenclosure includes walls, where each wall may be associated with aforce. In one embodiment, a particular type of enclosure is provided tomodify the forces of a different enclosure to prevent conflicts betweenthe forces of overlapping or closely-positioned enclosures.

The specification provides several embodiments of components in a forcefeedback system. The architecture on the host computer allowsmulti-tasking application programs to interface with the force feedbackdevice without conflicts. The force feedback device provides bothrelative position reporting and absolute position reporting to allowgreat flexibility. A relative position reporting device allows maximumcompatibility with existing software. Information such as ballisticparameters and screen size sent from the host to the force feedbackdevice allow accurate mouse positions and cursor positions to bedetermined in the force feedback environment.

These and other advantages will become apparent to those skilled in theart upon a reading of the following specification and a study of theseveral figures of the drawing.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a perspective view of one embodiment of a mouse interfacesystem;

FIG. 2 is a perspective view of an embodiment of a mechanism suitablefor the interface system of FIG. 1;

FIG. 3 is a block diagram of the system of FIG. 1 for controlling aforce feedback interface device;

FIG. 4 is a block diagram of an architecture for a host computerproviding multiple application programs communicating with the forcefeedback device;

FIG. 5 is a diagrammatic illustration of a background applicationprogram control panel allowing a user to characterize background forces;

FIGS. 6 a, 6 b and 6 c are diagrammatic illustrations of embodiments ofan enclosure force effect;

FIG. 7 is a diagrammatic illustration of a texture force effect;

FIG. 8 is a diagrammatic illustration of a grid force effect;

FIG. 9 is a block diagram illustrating a preferred embodiment ofimplementing the force feedback device and system;

FIG. 10 is a flow diagram illustrating a method of implementing positionreporting for the embodiment of FIG. 9;

FIG. 11 is a flow diagram illustrating a method of determining cursorposition and indexing in the embodiment of FIGS. 9 and 10;

FIG. 12 is a block diagram illustrating a second embodiment ofimplementing the force feedback device and system;

FIG. 13 is a flow diagram illustrating a method of implementing positionreporting for the embodiment of FIG. 12; and

FIGS. 14 and 15 are diagrammatic illustrations showing the errorcorrection between cursor positions from host computer and forcefeedback device in the embodiment of FIG. 13.

DETAILED DESCRIPTION OF EXAMPLE EMBODIMENTS

FIG. 1 is a perspective view of a force feedback mouse interface system10 capable of providing input from the user to a host computer based onthe user's manipulation of the mouse and capable of providing forcefeedback to the user of the mouse system based on events occurring in anenvironment implemented by the host computer. Mouse system 10 includesan interface device 11 that includes a user manipulatable object ormanipulandum 12 and an interface 14, and a host computer 18.

User object (or “manipulandum”) 12 is an physical object that ispreferably grasped or gripped and manipulated by a user. By “grasp,” itis meant that users may releasably engage a portion of the object insome fashion, such as by hand, with their fingertips, etc. For example,images are displayed and/or modified on a display screen 20 of thecomputer system 18 in response to such manipulations. In the describedembodiment, user object 12 is a mouse 12 that is shaped so that a user'sfingers or hand may comfortably grasp the object and move it in theprovided degrees of freedom in physical space. For example, a user canmove mouse 12 to correspondingly move a computer generated graphicalobject, such as a cursor or other image, in a graphical environmentprovided by computer 18. The available degrees of freedom in which mouse12 can be moved are determined from the interface 14, described below.In addition, mouse 12 preferably includes one or more buttons 15 toallow the user to provide additional commands to the computer system.

It will be appreciated that a great number of other types of usermanipulable objects can be used with the method and apparatus in placeof or in addition to mouse 12. For example, such objects may include asphere, a puck, a joystick, cubical- or other-shaped hand grips, afingertip receptacle for receiving a finger or a stylus, a flat planarsurface like a plastic card having a rubberized, contoured, and/or bumpysurface, a handheld remote control used for controlling web pages orother devices, or other objects. In one embodiment, a small fingertipjoystick can be provided, where a small stick is moved in a small planarregion with a user's fingertips. Spring forces can be provided by theactuators of the device 111 to bias the stick (or any type of joystick)toward the center of the planar region to simulate a spring return onthe joystick. Since fingertips are used, output forces need not be ashigh a magnitude as in other embodiments. Also, mouse 12 can be providedwith such a centering spring bias, e.g. when used like a joystick ingaming applications.

Interface 14 interfaces mechanical and electrical input and outputbetween the mouse 12 and host computer 18 implementing the applicationprogram, such as a GUI, simulation or game environment. Interface 14provides multiple degrees of freedom to mouse 12; in the preferredembodiment, two linear, planar degrees of freedom are provided to themouse, as shown by arrows 22. In other embodiments, greater or fewerdegrees of freedom can be provided, as well as rotary degrees offreedom. For many applications, mouse 12 need only be moved in a verysmall workspace area.

In a preferred embodiment, the user manipulates mouse 12 in a planarworkspace, much like a traditional mouse, and the position of mouse 12is translated into a form suitable for interpretation by positionsensors of the interface 14. The sensors track the movement of the mouse12 in planar space and provide suitable electronic signals to anelectronic portion of interface 14. The interface 14 provides positioninformation to host computer 18. In addition, host computer 18 and/orinterface 14 provide force feedback signals to actuators coupled tointerface 14, and the actuators generate forces on members of themechanical portion of the interface 14 to provide forces on mouse 12 inprovided or desired degrees of freedom. The user experiences the forcesgenerated on the mouse 12 as realistic simulations of force sensationssuch as jolts, springs, textures, enclosures, circles, ellipses, grids,vibrations, “barrier” forces, and the like.

The electronic portion of interface 14 may couple the mechanical portion24 of the interface to the host computer 18. The electronic portion ispreferably included within the housing 21 of the interface 14 or,alternatively, the electronic portion may be included in host computer18 or as a separate unit with its own housing. More particularly,interface 14 includes a local microprocessor distinct and separate fromany microprocessors in the host computer 18 to control force feedback onmouse 12 independently of the host computer, as well as sensor andactuator interfaces that convert electrical signals to appropriate formsusable by the mechanical portion of interface 14 and host computer 18.

For example, a rigid surface is generated on computer screen 20 and acomputer object (e.g., cursor) controlled by the user collides with thesurface. In a preferred embodiment, high-level host commands can be usedto provide the various forces associated with the rigid surface. Thelocal control mode using a local microprocessor in interface 14 can behelpful in increasing the response time for forces applied to the userobject, which is essential in creating realistic and accurate forcefeedback. For example, it is preferable that host computer 18 send a“spatial representation” to the local microprocessor, which is datadescribing the locations of some or all the graphical objects displayedin a GUI or other graphical environment which are associated with forcesand the types/characteristics of these graphical objects. Themicroprocessor can store such a spatial representation in local memory,and thus will be able to determine interactions between the user objectand graphical objects (such as the rigid surface) independently of thehost computer. In addition, the microprocessor can be provided with thenecessary instructions or data to check sensor readings, determinecursor and target positions, and determine output forces independentlyof host computer 18. The host could implement program functions (such asdisplaying images) when appropriate, and synchronization commands can becommunicated between the microprocessor and host 18 to correlate themicroprocessor and host processes. Such commands and relatedfunctionality is discussed in greater detail below. Alternatively, thecomputer 18 can directly send force feedback signals to the interface 14to generate forces on mouse 12. A suitable embodiment of the electricalportion of interface 14 is described in detail with reference to FIG. 3.

The interface 14 can be coupled to the computer 18 by a bus 17, whichcommunicates signals between interface 14 and computer 18 and also, inthe preferred embodiment, provides power to the interface 14 (e.g. whenbus 17 includes a USB interface). In other embodiments, signals can besent between interface 14 and computer 18 by wirelesstransmission/reception. In preferred embodiments, the interface 14serves as an input/output (I/O) device for the computer 18. Theinterface 14 can also receive inputs from other input devices orcontrols that are associated with mouse system 10 and can relay thoseinputs to computer 18. For example, commands sent by the user activatinga button on mouse 12 can be relayed to computer 18 by interface 14 toimplement a command or cause the computer 18 to output a command to theinterface 14.

Host computer 18 is preferably a personal computer or workstation, suchas an IBM-PC compatible computer or Macintosh personal computer, or aSUN or Silicon Graphics workstation. For example, the computer 18 canoperate under the Windows™ or MS-DOS operating system in conformancewith an IBM PC AT standard. Alternatively, host computer system 18 canbe one of a variety of home video game systems commonly connected to atelevision set, such as systems available from Nintendo, Sega, or Sony.In other embodiments, host computer system 18 can be a “set top box”which can be used, for example, to provide interactive televisionfunctions to users, or a “network-” or “internet-computer” which allowsusers to interact with a local or global network using standardconnections and protocols such as used for the Internet and World WideWeb. Host computer preferably includes a host microprocessor, randomaccess memory (RAM), read only memory (ROM), input/output (I/O)circuitry, and other components of computers well-known to those skilledin the art.

Host computer 18 preferably implements one or more application programs(“applications”) with which a user is interacting via mouse 12 and otherperipherals, if appropriate, and which can include force feedbackfunctionality. For example, the host application programs can include asimulation, video game, Web page or browser that implements HTML or VRMLinstructions, word processor, drawing program, spreadsheet, scientificanalysis program, or other application program that utilizes input ofmouse 12 and outputs force feedback commands to the mouse 12. Typically,an operating systems such as Windows™, MS-DOS, MacOS, Unix, is alsorunning on the host computer and preferably includes its own forcefeedback functionality. In one preferred embodiment, the operatingsystem and application programs utilize a graphical user interface (GUI)to present options to a user, display data and images, and receive inputfrom the user. In the preferred embodiment, multiple applications canrun simultaneously in a multitasking environment of the host computer,as is detailed below. Herein, computer 18 may be referred as displaying“graphical objects” or “computer objects.” These objects are notphysical objects, but are logical software unit collections of dataand/or procedures that may be displayed as images by computer 18 ondisplay screen 20, as is well known to those skilled in the art. Adisplayed cursor or a simulated cockpit of an aircraft might beconsidered a graphical object. The host application program checks forinput signals received from the electronics and sensors of interface 14,and outputs force values and/or commands to be converted into forces onmouse 12. Suitable software drivers which interface such simulationsoftware with computer input/output (I/O) devices are available fromImmersion Human Interface Corporation of San Jose, Calif.

Display device 20 can be included in host computer 18 and can be astandard display screen (LCD, CRT, etc.), 3-D goggles, or any othervisual output device. Typically, the host application provides images tobe displayed on display device 20 and/or other feedback, such asauditory signals. For example, display screen 20 can display images froma GUI. Images describing a moving, first person point of view can bedisplayed, as in a virtual reality game. Or, images describing athird-person perspective of objects, backgrounds, etc. can be displayed.Alternatively, images from a simulation, such as a medical simulation,can be displayed, e.g., images of tissue and a representation of amanipulated user object 12 moving through the tissue, etc.

There are two primary “control paradigms” of operation for mouse system10: position control and rate control. Position control is the moretypical control paradigm for mouse and similar controllers, and refersto a mapping of mouse 12 in which displacement of the mouse in physicalspace directly dictates displacement of a graphical object. Under aposition control mapping, the computer object does not move unless theuser object is in motion. Also, “ballistics” or other non-linearadjustments to cursor position can be used in which, for example, slowmotions of the mouse have a different scaling factor for cursor movementthan fast motions of the mouse, to allow more control of short cursormovements. Several different ways of implementing ballistics and othercontrol adjustments in a force feedback device are described in U.S.Pat. No. 6,252,579, and these adjustments can be used in mouse system 10if desired.

As shown in FIG. 1, the host computer may have its own “screen frame” 28(or host frame) which is displayed on the display screen 20. Incontrast, the mouse 12 has its own “device frame” (or local frame) 30 inwhich the mouse 12 is moved. In a position control paradigm, theposition (or change in position) of a user-controlled graphical object,such as a cursor, in host frame 30 corresponds to a position (or changein position) of the mouse 12 in the local frame 28.

Rate control is also used as a control paradigm. This refers to amapping in which the displacement of the mouse 12 is abstractly mappedto motion of a computer object under control. There is not a directphysical mapping between physical object (mouse) motion and computerobject motion. Thus, most rate control paradigms are fundamentallydifferent from position control in that the user object can be heldsteady at a given position but the controlled computer object is inmotion at a commanded or given velocity, while the position controlparadigm only allows the controlled computer object to be in motion ifthe user object is in motion.

The mouse interface system 10 is useful for both position control(“isotonic”) tasks and rate control (“isometric”) tasks. For example, asa traditional mouse, the position of mouse 12 in its local frame 30workspace can be directly mapped to a position of a cursor in host frame28 on display screen 20 in a position control paradigm. Alternatively,the displacement of mouse 12 in a particular direction against anopposing output force can command rate control tasks in an isometricmode. An implementation that provides both isotonic and isometricfunctionality for a force feedback controller and which is very suitablefor the interface device is described in U.S. Pat. No. 5,825,308.

Mouse 12 is preferably supported and suspended above a grounded pad 32by the mechanical portion of interface 14, described below. Pad 32 orsimilar surface is supported by grounded surface 34. Pad 32 (oralternatively grounded surface 34) provides additional support for themouse and relieve stress on the mechanical portion of interface 14. Inaddition, a wheel, roller, Teflon pad or other device can be used tosupport the mouse.

Mouse 12 can be used, for example, to control a computer-generatedgraphical object such as a cursor displayed in a graphical computerenvironment, such as a GUI. The user can move the mouse in 2D planarworkspace to move the cursor to graphical objects in the GUI or performother tasks. In other graphical environments, such as a virtual realityvideo game, a user can be controlling a computer player or vehicle inthe virtual environment by manipulating the mouse 12. The computersystem tracks the position of the mouse with sensors as the user movesit. The computer system may also provide force feedback commands to themouse, for example, when the user moves the graphical object against agenerated surface such as an edge of a window, a virtual wall, etc. Itthus appears and feels to the user that the mouse and the graphicalobject are contacting real surfaces.

The mouse system 10 may also include an indexing function or “indexingmode” which allows the user to redefine the offset between the positionsof the mouse 12 in the local frame and a user-controlled graphicalobject, such as a cursor, in the host frame displayed by host computer18. In one implementation, the user may reposition the mouse 12 withoutproviding any input to the host computer, thus allowing the user toredefine the offset between the object's position and the cursor'sposition. Such indexing is achieved through an input device such as abutton, switches, sensors, or other input devices. As long as theindexing device is activated, the mouse 12 is in indexing mode; when thebutton is released (or indexing mode otherwise exited), the position ofthe cursor is again controlled by the mouse 12. A hand weight switch canalso be provided which inherently causes indexing when the user removeshand or finger weight from mouse 12. In one embodiment, thefunctionality of a safety switch and the indexing mode are integratedinto one input device, as described in greater detail in U.S. Pat. Nos.5,825,308 and 6,100,874.

A different way to allow indexing is to provide a combined positioncontrol and rate control device which allows different forms of controlof the cursor depending on the position of the mouse in its workspace.This embodiment is described in greater detail below and in U.S. Pat.No. 6,252,579.

FIG. 2 is a perspective view of a preferred embodiment of the mousedevice 11 with the cover portion of housing 21 and the grounded pad 32removed. Mechanical linkage 40 provides support for mouse 12 and couplesthe mouse to a grounded surface 34, such as a tabletop or other support.Linkage 40 is, in the described embodiment, a 5-member (or “5-bar”)linkage. Fewer or greater numbers of members in the linkage can beprovided in alternate embodiments.

Ground member 42 of the linkage 40 is a base for the support of thelinkage and is coupled to or resting on a ground surface 34. The groundmember 42 in FIG. 2 is shown as a plate or base that extends under mouse12. The members of linkage 40 are rotatably coupled to one anotherthrough the use of rotatable pivots or bearing assemblies, all referredto as “bearings” herein. Base member 44 is rotatably coupled to groundmember 42 by a grounded bearing 52 and can rotate about an axis A. Linkmember 46 is rotatably coupled to base member 44 by bearing 54 and canrotate about a floating axis B, and base member 48 is rotatably coupledto ground member 42 by bearing 52 and can rotate about axis A. Linkmember 50 is rotatably coupled to base member 48 by bearing 56 and canrotate about floating axis C, and link member 50 is also rotatablycoupled to link member 46 by bearing 58 such that link member 50 andlink member 46 may rotate relative to each other about floating axis D.

Linkage 40 is formed as a five-member closed-loop chain. Each member inthe chain is rotatably coupled to two other members of the chain toprovide mouse 12 with two degrees of freedom, i.e., mouse 12 can bemoved within a planar x-y workspace. Mouse 12 is coupled to link members46 and 50 by rotary bearing 58. and may rotate at least partially aboutaxis D. A pad or other support can be provided under mouse 12 to helpsupport the mouse. Transducer system is used to sense the position ofmouse 12 in its workspace and to generate forces on the mouse 12.Transducer system preferably includes sensors 62 and actuators 64. Thesensors 62 collectively sense the movement of the mouse 12 in theprovided degrees of freedom and send appropriate signals to theelectronic portion of interface 14. Sensor 62 a senses movement of linkmember 48 about axis A, and sensor 62 b senses movement of base member44 about axis A. These sensed positions about axis A allow thedetermination of the position of mouse 12 using known constants such asthe lengths of the members of linkage 40 and using well-known coordinatetransformations.

Sensors 62 are, in the described embodiment, grounded optical encodersthat sense the intermittent blockage of an emitted beam. A groundedemitter/detector portion 71 includes an emitter that emits a beam whichis detected by a grounded detector. A moving encoder disk portion or“arc” 74 is provided at the end of members 44 and 48 which each blockthe beam for the respective sensor in predetermined spatial incrementsand allows a processor to determine the position of the arc 74 and thusthe members 44 and 48 by counting the spatial increments. Also, avelocity of members 44 and 48 based on the speed of passing encodermarks can also be determined. In one embodiment, dedicated electronicssuch as a “haptic accelerator” may determine velocity and/oracceleration, as disclosed in U.S. Pat. No. 5,999,168. Sensors 62 aredescribed in greater detail in U.S. Pat. Nos. 6,100,874 and 6,166,723.

Transducer system also preferably includes actuators 64 to transmitforces to mouse 12 in space, i.e., in two (or more) degrees of freedomof the user object. The bottom housing plate 65 of actuator 64 a isrigidly coupled to ground member 42 (or grounded surface 34) and amoving portion of actuator 64 a (preferably a coil) is integrated intothe base member 44. The actuator 64 a transmits rotational forces tobase member 44 about axis A. The housing 65 of the grounded portion ofactuator 64 b is rigidly coupled to ground member 42 or ground surface34 through the grounded housing of actuator 64 b, and a moving portion(preferably a coil) of actuator 64 b is integrated into base member 48.Actuator 64 b transmits rotational forces to link member 48 about axisA. The combination of these rotational forces about axis A allows forcesto be transmitted to mouse 12 in all directions in the planar workspaceprovided by linkage 40 through the rotational interaction of the membersof linkage 40. The integration of the coils into the base members 44 and48 is advantageous and is discussed below. The operation of theelectromagnetic actuators 64 is described in greater detail is U.S. Pat.Nos. 6,100,874 and 6,166,723. In other embodiments, other types ofactuators can be used.

FIG. 3 is a block diagram illustrating the electronic portion ofinterface 14 and host computer 18 suitable for use. Mouse interfacesystem 10 includes a host computer 18, electronic interface 26,mechanical portion 24, and mouse or other user object 12. Electronicinterface 26, mechanical portion 24, and mouse 12 can also collectivelybe considered the “force feedback interface device” 11 that is coupledto the host computer. A similar system is described in detail in U.S.Pat. No. 5,734,373.

As explained with reference to FIG. 1, computer 18 is preferably apersonal computer, workstation, video game console, or other computingor display device. Host computer system 18 commonly includes a hostmicroprocessor 108, random access memory (RAM) 110, read-only memory(ROM) 112, input/output (I/O) electronics 114, a clock 116, a displaydevice 20, and an audio output device 118. Host microprocessor 108 caninclude a variety of available microprocessors from Intel, AMD,Motorola, or other manufacturers. Microprocessor 108 can be singlemicroprocessor chip, or can include multiple primary and/orco-processors. Microprocessor 108 preferably retrieves and storesinstructions and other necessary data from RAM 110 and ROM 112 as iswell known to those skilled in the art. In the described embodiment,host computer system 18 can receive sensor data or a sensor signal via abus 120 from sensors of system 10 and other information. Microprocessor108 can receive data from bus 120 using I/O electronics 114, and can useI/O electronics to control other peripheral devices. Host computersystem 18 can also output commands to interface device via bus 120 tocause force feedback for the interface system 10.

Clock 116 is a standard clock crystal or equivalent component used byhost computer 18 to provide timing to electrical signals used by hostmicroprocessor 108 and other components of the computer system 18.Display device 20 is described with reference to FIG. 1. Audio outputdevice 118, such as speakers, can be coupled to host microprocessor 108via amplifiers, filters, and other circuitry well known to those skilledin the art. Host processor 108 outputs signals to speakers 118 toprovide sound output to the user when an “audio event” occurs during theimplementation of the host application program. Other types ofperipherals can also be coupled to host processor 108, such as storagedevices (hard disk drive, CD ROM drive, floppy disk drive, etc.),printers, and other input and output devices.

Electronic interface 26 is coupled to host computer system 18 by abi-directional bus 120. The bi-directional bus sends signals in eitherdirection between host computer system 18 and the interface device. Bus120 can be a serial interface bus providing data according to a serialcommunication protocol, a parallel bus using a parallel protocol, orother types of buses. An interface port of host computer system 18, suchas an RS232 serial interface port, connects bus 120 to host computersystem 18. In another embodiment, an additional bus can be included tocommunicate between host computer system 18 and interface device 11. Onepreferred serial interface bus used is the Universal Serial Bus (USB).The USB standard provides a relatively high speed serial interface thatcan provide force feedback signals with a high degree of realism. USBcan also source power to drive actuators 64 and other devices. Inaddition, the USB standard includes timing data that is encoded alongwith differential data. Alternatively, Firewire (also called 1392) canbe used as bus 120; or, the bus can be between an interface card in thehost computer 18, where the interface card holds components of device 11such as microprocessor 130.

Electronic interface 26 includes a local microprocessor 130, local clock132, local memory 134, sensor interface 136, and actuator interface 138.Interface 26 may also include additional electronic components forcommunicating via standard protocols on bus 120. In various embodiments,electronic interface 26 can be included in mechanical portion 24, inhost computer 18, or in its own separate housing. Different componentsof interface 26 can be included in portion 24 or host computer 18 ifdesired.

Local microprocessor 130 preferably coupled to bus 120 and may beclosely linked to mechanical portion 24 to allow quick communicationwith other components of the interface device. Processor 130 isconsidered “local” to interface device 11, where “local” herein refersto processor 130 being a separate microprocessor from any processors 108in host computer 18. “Local” also preferably refers to processor 130being dedicated to force feedback and sensor I/O of the interface system10, and being closely coupled to sensors and actuators of the mechanicalportion 24, such as within the housing of or in a housing coupledclosely to portion 24. Microprocessor 130 can be provided with softwareinstructions to wait for commands or requests from computer host 18,parse/decode the command or request, and handle/control input and outputsignals according to the command or request. In addition, processor 130preferably operates independently of host computer 18 by reading sensorsignals and calculating appropriate forces from those sensor signals,time signals, and force processes selected in accordance with a hostcommand, and output appropriate control signals to the actuators. Asuitable microprocessor for use as local microprocessor 130 includes the8×930AX by Intel; or alternatively the MC68HC711E9 by Motorola or thePIC 16C74 by Microchip, for example. Microprocessor 130 can include onemicroprocessor chip, or multiple processors and/or co-processor chips.In other embodiments, microprocessor 130 can include digital signalprocessor (DSP) functionality.

For example, in one host-controlled embodiment that utilizesmicroprocessor 130, host computer 18 can provide low-level forcecommands over bus 120, which microprocessor 130 directly transmits tothe actuators. In a different local control embodiment, host computersystem 18 provides high level supervisory commands to microprocessor 130over bus 120, and microprocessor 130 manages low level force controlloops to sensors and actuators in accordance with the high levelcommands and independently of the host computer 18. In the local controlembodiment, the microprocessor 130 can process inputted sensor signalsto determine appropriate output actuator signals by following theinstructions of a “force process” that may be stored in local memory andincludes calculation instructions, formulas, force magnitudes, or otherdata. The force process can command distinct force sensations, such asvibrations, textures, jolts, or even simulated interactions betweendisplayed objects. An “enclosure” host command can also be provided,which causes the microprocessor to define a box-like enclosure in agraphical environment, where the enclosure has sides characterized bywall and texture forces, as described in U.S. Pat. No. 6,100,874. Thehost can send the local processor a spatial layout of objects in thegraphical environment so that the microprocessor has a mapping oflocations of graphical objects like enclosures and can determineinteractions with the cursor locally. Force feedback used in graphicalenvironments is described in greater detail in U.S. Pat. Nos. 6,219,032,5,825,308, and 6,252,579.

Sensor signals used by microprocessor 130 are also reported to hostcomputer system 18, which updates a host application program and outputsforce control signals as appropriate. For example, if the user movesmouse 12, the computer system 18 receives position and/or other signalsindicating this movement and can move a displayed cursor in response.These embodiments are described in greater detail in U.S. Pat. No.5,734,373. In an alternate embodiment, no local microprocessor 130 isincluded in interface system 10, and host computer 18 directly controlsand processes all signals to and from the interface 26 and mechanicalportion 24.

A local clock 132 can be coupled to the microprocessor 130 to providetiming data, similar to system clock 116 of host computer 18; the timingdata might be required, for example, to compute forces output byactuators 64 (e.g., forces dependent on calculated velocities or othertime dependent factors). In alternate embodiments using the USBcommunication interface, timing data for microprocessor 130 can beretrieved from the USB interface. Local memory 134, such as RAM and/orROM, is preferably coupled to microprocessor 130 in interface 26 tostore instructions for microprocessor 130 and store temporary and otherdata. Microprocessor 130 may also store calibration parameters in alocal memory 134 such as an EEPROM. As described above, link or memberlengths or manufacturing variations and/or variations in coil winding ormagnet strength can be stored. Memory 134 may be used to store the stateof the force feedback device, including a reference position, currentcontrol mode or configuration, etc.

Sensor interface 136 may optionally be included in electronic interface26 to convert sensor signals to signals that can be interpreted by themicroprocessor 130 and/or host computer system 18. For example, sensorinterface 136 can receive signals from a digital sensor such as anencoder and convert the signals into a digital binary numberrepresenting the position of a member of mechanical apparatus 14. Ananalog to digital converter (ADC) in sensor interface 136 can convert areceived analog signal to a digital signal for microprocessor 130 and/orhost computer 18. Such circuits, or equivalent circuits, are well knownto those skilled in the art. Alternately, microprocessor 130 or host 18can perform these interface functions. Other types of interfacecircuitry 136 can also be used, e.g., the electronic interface describedin U.S. Pat. No. 5,576,727.

Actuator interface 138 can be optionally connected between the actuators64 and microprocessor 130. Interface 138 converts signals frommicroprocessor 130 into signals appropriate to drive the actuators.Interface 138 can include power amplifiers, switches, digital to analogcontrollers (DACs), and other components. Such interfaces are well knownto those skilled in the art. In alternate embodiments, interface 138circuitry can be provided within microprocessor 130 or in the actuators.

In the described embodiment, power is supplied to the actuators 64 andany other components (as required) by the USB. Since the electromagneticactuators of the described embodiment have a limited physical range andneed only output, for example, about 3 ounces of force to createrealistic force sensations on the user, very little power is needed. Forexample, one way to draw additional power from the USB is to configuredevice II to appear as more than one peripheral to host computer 18; forexample, each provided degree of freedom of mouse 12 can be configuredas a different peripheral and receive its own allocation of power.Alternatively, power from the USB can be stored and regulated by device11 and thus used when needed to drive actuators 64. For example, powercan be stored over time and then immediately dissipated to provide ajolt force to the user object 12. A battery or a capacitor circuit, forexample, can store energy and discharge or dissipate the energy whenpower is required by the system and/or when enough power has beenstored. Alternatively, a power supply 140 can optionally be coupled toactuator interface 138 and/or actuators 64 to provide electrical power.The power storage embodiment described above, using a battery orcapacitor circuit, can also be used in non-USB embodiments to allow asmaller power supply 140 to be used.

Mechanical portion 24 is coupled to electronic portion and preferablyincludes sensors 62, actuators 64, and linkage 40. These components aredescribed in detail above. Sensors 62 sense the position, motion, and/orother characteristics of mouse 12 along one or more degrees of freedomand provide signals to microprocessor 130 including informationrepresentative of those characteristics. Typically, a sensor 62 isprovided for each degree of freedom along which mouse 12 can be moved,or, a single compound sensor can be used for multiple degrees offreedom. Example of sensors suitable for embodiments described hereinare rotary optical encoders, as described above, linear opticalencoders, analog sensors such as potentiometers, or non-contact sensors,such as Hall effect magnetic sensors or an optical sensor such as alateral effect photo diode having an emitter/detector pair. In addition,velocity sensors (e.g., tachometers) and/or acceleration sensors (e.g.,accelerometers) for measuring acceleration can be used. Furthermore,either relative or absolute sensors can be employed.

Actuators 64 transmit forces to mouse 12 in one or more directions alongone or more degrees of freedom in response to signals output bymicroprocessor 130 and/or host computer 18, i.e., they are “computercontrolled.” Typically, an actuator 64 is provided for each degree offreedom along which forces are desired to be transmitted. Actuators 64can be the electromagnetic actuators described above, or can be otheractive actuators, such as linear current control motors, stepper motors,pneumatic/hydraulic active actuators, a torquer (motor with limitedangular range); or passive actuators such as magnetic particle brakes,friction brakes, or pneumatic/hydraulic passive actuators, passivedamper elements, an electrorheological fluid actuator, amagnetorheological fluid actuator. In addition, in voice coilembodiments, multiple wire coils can be provided, where some of thecoils can be used to provide back EMF and damping forces. In someembodiments, all or some of sensors 62 and actuators 64 can be includedtogether as a sensor/actuator pair transducer.

Mechanism 40 is preferably the five-member linkage 40 described above,but can also be one of several types of mechanisms. For example,mechanisms disclosed in U.S. Pat. Nos. 5,731,804; 5,767,839; 5,721,566;5,805,140; 5,691,898; 6,028,593; 6,024,576; and 5,828,197 can beincluded. Mouse 12 can alternatively be a puck, joystick, or otherdevice or article coupled to linkage 40, as described above.

Other input devices 141 can optionally be included in system 10 and sendinput signals to microprocessor 130 and/or host computer 18. Such inputdevices can include buttons, such as buttons 15 on mouse 12, used tosupplement the input from the user to a GUI, game, simulation, etc.Also, dials, switches, voice recognition hardware (with softwareimplemented by host 18), or other input mechanisms can be used.

Safety or “deadman” switch 150 is preferably included in interfacedevice to provide a mechanism to allow a user to deactivate actuators 64for safety reasons. In the preferred embodiment, the user mustcontinually close safety switch 150 during manipulation of mouse 12 toactivate the actuators 64. If, at any time, the safety switch isdeactivated (opened) the actuators are deactivated while the safetyswitch is open. For example, one embodiment of safety switch is acapacitive contact sensor that detects when the user is contacting mouse12. Alternatively, a mechanical switch, electrostatic contact switch, oroptical switch located on mouse 12 or on a convenient surface of ahousing 21 can be used. A z-axis force sensor, piezo electric sensors,force sensitive resistors, or strain gauges can also be used. The stateof the safety switch can be sent to the microprocessor 130 or host 18.In one embodiment, mouse 12 includes a hand weight safety switch. Thesafety switch preferably deactivates any generated forces on the mousewhen the mouse is not in use and/or when the user desires to deactivateoutput forces.

In some embodiments of interface system 10, multiple mechanicalapparatuses 102 and/or electronic interfaces 100 can be coupled to asingle host computer system 18 through bus 120 (or multiple buses 120)so that multiple users can simultaneously interface with the hostapplication program (in a multi-player game or simulation, for example).In addition, multiple players can interact in the host applicationprogram with multiple interface systems 10 using networked hostcomputers 18, as is well known to those skilled in the art. Also, theinterface device can be coupled to multiple host computers; for example,a local host computer can display images based on data received from aremote host computer coupled to the local host through a network.

Architecture of Host Computer

The host computer 18 interacts with interface device 11 using a numberof different levels of controllers. These controllers are preferablyimplemented in software, e.g. program instructions or code, and such isthe embodiment described herein; however, all or part of the controllersmay also be implemented in hardware, where the conversion offunctionality of the software to hardware is well known to those skilledin the art.

The architecture described herein is oriented towards providing forcefeedback functionality to a host computer connected to a force feedbackinterface device, where multiple applications may be runningsimultaneously on the host computer. Each application program may haveits own set of force sensations to output to the device; since thedevice cannot implement all force sensations at any one time due to costand hardware constraints, the forces commanded by each application mustbe organized by the architecture to take these limitations into account.

FIG. 4 is a block diagram of a preferred architecture for the hostcomputer to communicate with and control a force feedback interfacedevice 11 with multiple application programs running on the hostcomputer. Application programs 202 and 204 are concurrently running onthe host computer 18. In the most typical implementation, one of theapplication programs is actively running in an operating system as the“active” application program that displays one or more active windows inthe GUI (also known as the application program that is “in focus” orwhich has “keyboard focus”). The active window is typically the topmostdisplayed window in which input is provided by the user using themouse-controlled cursor, a keyboard, or other peripheral. The otherapplications are “inactive” in that they are not receiving input fromthe user (although they may have a window displayed in the GUI which canbe updated on the screen). The inactive applications may also receiveinput or send output. For example, the Windows™ operating system fromMicrosoft Corp. provides a multitasking or pseudo-multitaskingenvironment in which programs run simultaneously; other operatingsystems such as Unix also offer multitasking. For example, a wordprocessor may be the active application to receive input from thekeyboard and display input characters in a displayed active window ondisplay screen 20, while a inactive communication program may bereceiving data over a network and saving the data on a storage device,or sending data out to be printed. Or, a inactive drawing program may bedisplaying a graphical image in a window that is not currently active,while the user inputs text into the active word processor window. Whenthe user moves the cursor over an inactive window and provides a commandgesture such as clicking a button on a mouse, the inactive windowbecomes the active window and the former active window becomes inactive.The active application is also known as the “foreground” application, inthe sense that its force sensations are being implemented by the forcefeedback device, as described below.

A master application 206 also is running on host computer 18 and is alsoknown as the “background” force feedback application. This applicationis preferably a general purpose program that always runs inactively inthe operating system and whose set of commanded forces are alwaysavailable to be output and controlled on the interface device 11 and/orother devices. For example, a preferred embodiment of the masterapplication is a “desktop” control panel for force feedback. An exampleof such a program is illustrated in FIG. 5. A “mouse properties” dialogbox 240 can be displayed which allows the user to specify forcesensations 244 that are assigned to specified object types 242 in thedisplayed graphical environment, e.g. a graphical user interface (GUI).For example, the assigned force sensation 244 can be a vibration forcehaving a specified frequency, magnitude, duration, etc.; a single “pop”or jolt at a specified time and duration; a “tick” that is a small joltthat is output based on movement of the user object/cursor or at regularintervals during an activity such as scrolling; a damping forcecondition that causes a resistance to mouse motion depending on thevelocity of the user object 12 in its degrees of freedom or the cursorin the host frame on screen 20; or a spring that resists motion of theuser object based on distance to an origin of the spring. Other types offorces are possible as well, and are described in greater detail in U.S.Pat. Nos. 5,734,373 and 6,020,876.

The force sensations specified by the user for a user interface objecttype in dialog box 240 will be output by the force feedback device bydefault, unless a different foreground application program deactivatesthe force sensations or replaces a force sensation with its own. Forexample, the user can specify that menu objects 242 a in a GUI have asnap force 244 a associated with them by moving the slider 246 to theright, where the slider scale specifies the magnitude of the snap force.Thus, when the user moves the cursor in the GUI over a menu item in amenu during normal operation, the user will feel a snap force, i.e., aforce that draws the cursor/user object toward the center of the menuitem to allow easier menu selection. This snap force is preferablyapplied to all menus of all running application programs in the GUI,since it is a background force effect. If the foreground applicationprogram has its own force sensations which define that application'smenus to have a jolt instead of a snap, then the jolt will besuperimposed on the snap unless the active application programdeactivates the background force(s). In general, a particular activeapplication program can only command forces to objects in its ownwindows, e.g., that application's own menus, scrollbars, icons, windowborders, etc.

A user can specify multiple background force sensations 244 for eachuser interface object 242. This allows the multiple force sensations tobe superimposed on each other, unless the application program overridesone or more of the superimposed forces. Thus, a user can assign a damperforce sensation and a “ticks” force sensation to scrollbars in box 240,and all scrollbars will have these forces associated with them unlessoverriden by the foreground application program.

Other controls in box 240 include a device gain 248 to set thepercentage of maximum magnitude for all the forces for items 242; andselections 249 to allow force feedback functionality on the hostcomputer. Advanced button 250, when selected, preferably displays anadditional window of options with which the user can customize the forcesensations 244. For example, a user can specify positive or negativedamping (where negative damping feels like moving on ice) orunidirectional or bidirectional dampers. The user can specify thespacing or orientation of snap points on a grid, the envelope parametersfor a vibration, or the parameters for a snap force, e.g. the snap forceis defined as an enclosure and the user can customize the enclosure toturn off forces on one wall, turn on inner walls, etc. Such options canbe similar to those described in U.S. Pat. Nos. 6,147,674 and 6,169,540or those features provided in the force designing application I-ForceStudio from Immersion Human Interface Corporation. Other applicationprograms can also be used as the background or master applicationprogram 206.

Referring back to FIG. 4, application programs 202, 204, and 206communicate with an force feedback Application Programming Interface(“API”) 208 which is resident in the host computer's memory and whichallows a given application program to communicate with lower leveldrivers and other force feedback functions. For example, in the Windowsoperating system, API's are commonly used to allow a developer of anapplication program to call functions at a high level for use with theapplication program, and not worry about the low level details ofactually implementing the function.

The API includes a set of software “objects” that can be called tocommand a force feedback interface device 11. Objects are a set ofinstructions and/or data which can be called by a pointer and/or anidentifier and parameters to implement a specified function. Forexample, three types of objects are provided in one preferred APIimplementation: interface objects, device objects, and effect objects.Each of these objects makes use of one or more force feedback devicedrivers which are implemented as objects in the API 208.

Interface objects represent the API at the highest level. An applicationprogram (which is referred to as a “client” of the API) can create aninterface object to access lower level objects and code that implementforce feedback device functionality. For example, the interface objectallows an application program to enumerate and receive information aboutindividual devices and create lower level objects for each device usedby the application program.

Device objects each represent a physical force feedback device (or othercompatible device or peripheral) in communication with the host computer18. For example, the force feedback mouse device 11 would be representedas a single device object. The device objects access the set of forcefeedback routines to receive information about an associated physicaldevice, set the properties of the physical device, register eventhandlers (if events are implemented on the host), and to create effectobjects.

Effect objects each represent a force feedback effect defined by theapplication program to be output one or more times on a force feedbackdevice. The effect objects access the set of force feedback routines todownload force effects to the force feedback device, start and stop theoutput of effects by the force feedback device, and modify theparameters of the effects. Event objects can also be created to defineevents, as described in greater detail below.

A force “effect,” as referred to herein, is a single defined force orseries of forces that may be commanded within the API. The effecttypically has a name to identify it and one or more parameters to modifyor customize the force as necessary. For example, several types of forceeffects have been defined, including vibrations, enclosures, grids,textures, walls, dampers, snap sensations, vibrations, circles,ellipses, etc. For example, a vibration force effect may have parametersof duration, frequency, magnitude, and direction. The force sensations244 defined in dialog box 244 can be force effects; however, moregenerally, force sensations can be made up of one or more force effects.Force effects, in turn, are made up of one or more basic forceprototypes, such as springs, dampers, and vector forces.

In the preferred embodiment, an application program interacts with theAPI 208 by first receiving a pointer to a resident force feedbackinterface; for example, a preferred interface includes proceduresprovided in the Component Object Model (COM) interface of MicrosoftWindows, an object oriented interface. Using the force feedbackinterface, the application program enumerates the force feedback deviceson the computer system 18. The application program selects a desired oneof the force feedback devices and creates a device object associatedwith that device. Using the force feedback interface, the applicationthen acquires the device, sets the device up with setup and defaultparameters, and creates effect objects and event objects at timesdesignated by the developer of the application. At appropriate times,the application program will command the start, stop, or pause of theplayback of force effects by accessing the appropriate interfaceinstructions associated with the desired effect. The API indicates tothe context driver 210 to create a “context” (i.e. “effect set”) for anapplication program, and sends effects and events to be associated withthat context. A “context” is a group or set of effects and events thatare associated with a particular application program.

Context driver 210 receives effect set 222 and device manipulation data223 from the API 208. The context driver is provided at a level belowthe API to organize contexts for applications 202 and 204 running on thehost computer. In the preferred embodiment, the effects and events in acontext are not known to the application program itself; rather, thecontext driver 210 creates a context internally for an application.Thus, an application commands that a particular force sensation beoutput in response to different interactions or occurrences, e.g., aninteraction of a cursor with an object or region, or the output of aforce based on other criteria (time, received data, random event, etc.).The API sends the commanded effect(s) to the context driver 210, and thecontext driver stores the effects in the created context for thatapplication program.

Since each application may have a completely different set of forceeffects to output, each context is associated with its particularapplication program. In the preferred embodiment, there are two types ofcontexts: foreground contexts and background or primary contexts. Aforeground context is associated with the application program 202 or 204that is active in the operating system. A background context includesthe effects and events for the master application program 206, e.g., theeffects and events necessary to implement those force sensationsselected by the user in the dialog box 240 of FIG. 5 to be associatedwith particular GUI objects. In addition, a “global context” can beprovided, which includes common effects almost always used byapplication programs (e.g. a pop force) and which can automatically bedownloaded to the force feedback device. Effects in the global contextneed not be stored in individual contexts for particular applicationprograms and need not be sent to the force feedback device, thus savingmemory on the device.

When an application program is first executed by the host computer andloaded into memory, if the application is able to command a forcefeedback device, the application will query for the API 208. Oncecommunication is established, the API will contact the context driver210 to create an entry location for a context set for the initiatedapplication program.

The context driver 210 receives individual effects and events as theyare created by the application program using API 208 and stores theeffects and events in a context list 212, storing each context in adifferent storage location in the host's memory or on some other type ofstorage device. An active or inactive application program can create acontext and have it stored, but only the active application's contextwill be sent to the force feedback device. The context driver 210 canexamine an identifier in a created effect or event to determine whichapplication program is associated with it and thus store the effect orevent in the proper memory location. The context driver sets pointers tothe contexts and to the effects and events in the contexts to accessthem. An effect can be created initially, before any forces arecommanded, or the effect can be created and then immediately commandedto be output to the force feedback device. Each context also preferablyincludes an entry into a device state structure. This entry governs the“gain” or force level for all effects in the context. For example, allthe forces in the context can be cut to 50% of full magnitude by storinga value of 50 in the device state structure. One of the contexts storedin list 214 is a primary context 216, which is the list of effects andevents used by the master application 206 or “background” application.

At a later time, after the context driver has stored the contexts inlist 212, an application program may send a command to the API to outputor “start” a particular force sensation. The API checks whether theapplication program is active or in the background (primary); if not,the API ignores the command. Alternatively, the commands from aninactive foreground application can be stored and then sent to thedevice when the application becomes active. If the application is activeor background, the API sends the start information to the context driver210 indicating the application program that commanded the force and theparticular force effects to be commanded. The context driver 210 thenassociates the commanding application program with a context 214 in list212 and sends the effects from the context to the force feedback device(if not previously sent). For example, if a context for a particularapplication program includes a spring effect, a damper effect, and avibration effect, and the application program commands the vibration tobe output, then the context driver selects the vibration effects to beoutput to the device. The data describing this effect is then output bythe context driver 210. Similarly, the application program can send acommand to stop particular force effects, to pause the effects, to getthe status information of an effect, or to destroy an effect.

A context is therefore only allowed to exert forces with the forcefeedback device when that context is active, i.e., is associated with anactive application program or the background application. In thedescribed embodiment, only one foreground context can be active at anygiven time. Any number of background contexts may be simultaneouslyactive; however, there may be a device limit on the number of backgroundcontexts that may be created. For example, the mouse device 11 may onlyallow one background context to be created at any one time, which is thepreferred embodiment. Thus, if an inactive (not in focus) foregroundapplication program commands a force to be output, the API will ignorethe command after determining that the commanding application is notactive (or, the command will only be sent to the device when theapplication becomes active).

If the active application program becomes inactive (i.e. losesforeground or is removed from the host's memory) and a differentapplication becomes active, then the API indicates this to the contextdriver 210, which then deactivates the context associated with thatapplication program and loads the effects from the new active context tothe force feedback device 11. Likewise, when the original applicationprogram again becomes active, the API tells the context driver toactivate the associated context and load the appropriate effects to theforce feedback device.

Device manipulation data 223 is also received by context driver 210.Data 223 is used to set a global device state on the force feedbackdevice, as described below, and this information is passed unmodified tothe translation layer.

Translation layer 218 manages the sending of effects to the device 11,receives information from the device to the host, and maintains arepresentation of the memory of device 11. Layer 218 receives anindividual effect 219 for the active (or background) application programand device manipulation data 223 sent by the context driver 210. Thetranslation layer receives the effect from an context list 220 ofindividual effects 222 (list 220 represents a context 214). A differentcontext list 220 is provided in each context 214 of list 212. Eacheffect 222 in list 220 is a force that is to be output on the mouse 12by the force feedback device 11. Then the effects are to be sent to thedevice 11 when commanded by the application, they are selected andcopies are output to the device. Preferably, each effect is output bythe translation layer as soon as possible, in the order of receiving theeffects. Each effect stored in list 220 as examined by the translationlayer is available on force feedback device 11, i.e., the localmicroprocessor should recognize the effect and be able to output theeffect either immediately or when conditions dictate. The size of thelist 220 should be the same or smaller than the available memory forsuch a list in the force feedback device so that the translation layerknows when the memory of the force feedback device is full. If full, thetranslation layer can delay the output of additional effects untilenough memory space is available.

When an active application becomes inactive, the translation layer isinstructed by the context driver 210 to “unload” the effects of thecontext of the previous active application from the force feedbackdevice, receives the effects from the now active application and loadsthose effects to the force feedback device 11 (the effects for thebackground (primary) application are preferably never unloaded).

The translation layer also preferably handles events. For example, whena screen position is received from the device 11, the translation layercan check whether any of the conditions/triggers of the active eventsare met. If so, a message is sent which eventually reaches theassociated active or background application program, as described ingreater detail below. In alternate embodiments, the microprocessor 130on device 11 can check for events and send event notifications throughtranslation layer 218 up to the application program. However, this canbe undesirable in some embodiments since the event notification isprovided at a much slower rate than the force control loop of themicroprocessor 130.

The translation layer also can store a device state 224 in memory.Device manipulation data 223 from the active application determines thedevice state. This is the state that the active application programwishes to impose on the device, if any. For example, an overallcondition can be stored, such as an enable or disable for all forces, sothat if all forces are disabled, no forces will be output by the device.An overall gain can also be set to limit all output force magnitudes toa desired level or percentage of maximum output. The translation layeroutputs device messages 225 to the device 11 by way of the next layer.Messages may include force effects to be output and/or any otherinformation such as device identification numbers or instructions fromthe context driver for an effect (start, stop, pause, reset, etc.) Thetranslation layer outputs messages 225 in a form the device 11 canunderstand.

Device communication driver 226 communicates directly with the forcefeedback device. Driver 226 receives the device messages 225 fromtranslation layer 218 and directly transmits the messages to the forcefeedback device over bus 120, e.g. a USB. The driver is implemented, inthe preferred embodiment, as a standard driver to communicate over sucha serial port of host computer 18. Other types of drivers andcommunication interfaces can be used in other embodiments.

Host Command Structures

The host computer 18 and API 208 handle a variety of processescontrolling force feedback device 11. The preferred functionality ofmuch of the application programs and API is described in greater detailin U.S. Pat. Nos. 6,147,674, 6,078,308, and 6,252,579. Different effectsand events are used in force feedback systems are described below.

Effects

Effects are standardized forces that are determined according to apredefined characterization, which may include force algorithms, storedforce magnitudes, functions of space and/or time, a history of storedmotion values of the mouse, or other steps or parameters. An effect maybe based on time and be independent of the position of the mouse 12, ormay be spatially determined based on mouse position, velocity,acceleration, or any combination of these. Preferably, the device 11includes a number of effects standardized in its memory which it canimplement if the effects are within the active or background context.When the device 11 is determining output forces based on effects, themicroprocessor 130 checks if the effect is active, calculates the rawcontribution to the output force from the effect, applies an envelopescaling (detailed in U.S. Pat. No. 5,959,613), and sums the scaledcontribution to the total sum of forces contributed to by all effectscurrently being output. In determining the total sum, the devicepreferably combines all constant forces (e.g., conditions and time-basedforces) and limits the constant force sum to a predetermined magnitude,then combines all dynamic forces and limits the dynamic force sum to apredetermined magnitude. Dynamic forces are detailed in U.S. Pat. No.6,147,674. The two sums are then added together and the total force sumis output by the actuators of the device 11. Alternatively, all forcescan be treated the same and summed together.

FIGS. 6 a and 6 b illustrate one type of force effect provided by thehost in a graphical environment such as a GUI and known as an“enclosure.” Basic features of enclosures are disclosed in U.S. Pat. No.6,078,308. An enclosure is at its most basic level a rectangular objectprovided in a GUI which may be assigned with different forces for eachof its sides. The enclosure is a generic type of force feedback objectthat can be used for a variety of different graphical objects, includingbuttons, windows, sliders, scrollbars, menus, links on a web page, orgrid points in a drawing program.

FIG. 6 a illustrates the use of an enclosure for a window in a GUI. Thewindow 260 is displayed on the display device of the host computer. Theenclosure has eight walls 262 associated with it invisible to the visualperception of the user, where four walls are provided as an innerrectangle 264 and four walls are provided as an outer rectangle 266.Each wall 262 can be separately defined as either providing a forcepulling the user object toward the border of window 260 (attractiveforce), or pushing the user object away from the border of window 260(resistive force). The outer rectangle 266 walls affect the user objectwhen the user object is outside the window 260 between the rectangle 266and the window 260 border, and the inner rectangle 264 walls affect theuser object when it is inside the window 260 between the rectangle 264and the window border. In the preferred embodiment, a window 260 isassociated with a force enclosure by defining both outer rectangle 266and inner rectangle 264 to have an attractive force, so that the userobject and cursor tend to be attracted to the window border when withinthe appropriate range of the window. This, for example, allows the userto acquire the border and adjust the size of the window easily.Alternatively, the outer rectangle 266 can be defined as a resistiveforce (such as a spring) that requires the user to overcome theresistance to allow the user object entry into the window (and therectangle 266 can also be defined as a click surface to cause a functionto be applied when gaining entry). When the cursor/user object gainsentry to an enclosure, an “event” is preferably indicated to theapplication program, as explained above. In an alternative embodiment,enclosures can similarly defined for circles, ellipses, or other shapes,both regular and irregular.

The enclosure object also preferably has a number of other parametersthat further define the enclosure. For example, parameters may bespecified separately for each wall to define such characteristics as themagnitude of the resistive or attractive forces, which of the eightwalls are assigned forces, which walls provide clipping, the saturationlevel of the force applied in association with a wall, and the interiorforce, which can be specified as any force effect such as a damping,texture, or vibration force, that is applied while the cursor is insidethe enclosure.

FIG. 6 b illustrates another embodiment of an enclosure. A button 270can be a graphical button, a menu item, or an icon in a GUI. The outerrectangle 266 in this embodiment has been “turned off” so that no forcesare associated with it. The inner rectangle 264 has been defined as avery small rectangle at the center of the button 270. Resistive forcesare associated with the inner rectangular walls such that, once the userobject has entered the enclosure, a force biases the user object towardthe center of the button 270. This allows the user to target or“acquire” the button more easily with the cursor and reducesovershooting the button by accident by moving the cursor too far pastthe button.

Enclosures are quite useful for adding forces to web links on a web pageviewed in a web browser, such as Netscape Communicator by NetscapeCommunications or Internet Explorer by Microsoft. The inner wall forcesof FIG. 6 b can be used on a web link displayed on a web page to drawthe cursor/user object onto the link, thus allowing a user to moreeasily determine which images are links on the page. Other types offorces can also serve this function. Also, an “inside condition” such asa texture can be provided for the web link to cause some links to feelrough, some smooth, some bumpy, etc.

An example of an enclosure effect structure is provided below:

ENCLOSURE typedef struct { DWORD dwSize; RECT rectOutside; DWORDdwXWidth; DWORD dwYWidth; DWORD dwXStiffness; DWORD dwYStiffness; DWORDdwStiffnessMask; DWORD dwClippingMask; DWORD dwXSaturation; DWORDdwYSaturation; LP_CONDITION pInsideCondition } ENCLOSURE;dwSize: Size of the structure in bytes.rectOutside: Outside borders of the enclosure, in screen coordinates.When the mouse position is outside of rectangle defined by rectOutside,there are no forces exerted on the device from this enclosure.dwXWidth, dwYWidth: Width W of the region between a wall and the objectborder. In one implementation, the width of the inner wall and the outerwall regions is the same. Alternatively, they can be defined separately.This parameter can alternatively be specified as a deadband.dwXStiffness: Stiffness of the left and right walls. Defines the amountof horizontal resistance (force) felt by the user when attempting tobreak through a vertical wall. This value amounts to the negative andpositive coefficient of horizontal spring conditions that are appliedwhen the mouse is in the left and right walls, respectively.dwYStiffness: Stiffness of the top and bottom walls. Defines the amountof vertical resistance (force) felt by the user when attempting to breakthrough a horizontal wall.dwStiffnessMask: Mask specifying when resistance should be applied. Canbe one or more of the following values:NONE: No resistance is felt on any wall.INBOUNDTOPWALL, INBOUNDLEFTWALL, etc.: Resistance is felt when enteringthe enclosure through the top, bottom, left, or right wall, asspecified.OUTBOUNDTOPWALL, OUTBOUNDLEFTWALL, etc.: Resistance is felt when exitingthe enclosure through the top, bottom, left, or right wall, asspecified.INBOUNDANYWALL, OUTBOUNDANYWALL: Resistance is felt when entering orexiting, respectively, the enclosure through any wall.ANYWALL: Resistance is felt when entering or exiting the enclosurethrough any wall.dwClippingMask: Mask specifying when mouse cursor clipping should beapplied. Can be one or more of the following values:NONE: Clipping is not applied to any wallINBOUNDTOPWALL, INBOUNDLEFTWALL, etc.: Clipping is applied when enteringthe enclosure through the top, bottom, left, or right wall,respectively.OUTBOUNDTOPWALL, OUTBOUDLEFTWALL, etc.: Clipping is applied when exitingthe enclosure through the top, bottom, left, or right wall,respectively.INBOUNDANYWALL, OUTBOUNDANYWALL: Clipping is applied when entering orexiting, respectively, the enclosure through any wallANYWALL: Clipping is applied when entering or exiting the enclosurethrough any wall.dwXSaturation, dwYSaturation: Saturation level of spring effect felt bythe user when attempting to break through a vertical or horizontal wall,respectively.pInsideCondition: Points to a condition that is to be in effect when theuser mouse is in the deadband area. For example, can specify a springcondition, damper condition, and/or texture condition inside theenclosure. This is useful in graphical environments such as GUI's andweb pages/web browsers.

In another example of an enclosure, a circular or elliptical shape isdefined. For example, an elliptical enclosure can include only one wallthat is curved all the way around the ellipse. The inner and outer wallscan still be provided, as well as the rest of the other parameters. Thedimensions of the ellipse/circle can be provided as X and Y widths.Alternatively, an eccentricity parameter can define the eccentricity ofthe ellipse.

One problem with enclosures is that often the forces of the enclosureare desirable at one point in time but not at a different point in time.For example, a button having an enclosure has a attractive forceassociated with the enclosure to assist the user in acquiring the buttonwith the cursor. However, once the cursor is positioned inside theenclosure, the user may want to be able to freely move the cursor againwithout enclosure wall forces, since the target button has already beenacquired. Thus, in one embodiment, the forces associated with theenclosure are turned off once the cursor is moved inside the enclosure.Alternatively, the force magnitudes can be weakened or adjusted to alower level, e.g. ⅓ the normal magnitude, to allow the cursor to easilyexit the enclosure. Once the cursor has exited, the forces can be turnedback on. In an alternate embodiment, the forces associated with theenclosure can be turned off or weakened for a predetermined period oftime to allow the user to move the cursor out of the enclosure withouthindrance, and then the forces can be automatically turned back on oncethe time has expired. I yet a different embodiment, the forces areturned off only when the cursor has not moved for a predetermined periodof time; this indicates that the user has acquired the desired target.In still a further embodiment, the forces can be turned off when acommand gesture, such as a button 15 activation, is detected by the hostor microprocessor 130. These various embodiments can also be combined inother embodiments as desired. The host or microprocessor can determinewhen the enclosure has been entered and exited by the cursor through theuse of events, explained below.

Enclosures can also be defined to compensate for user controllingpeculiarities. For example, it has been found that up-down movement ofthe mouse 12 for most users is much easier that left-to-right movement.An enclosure having equal strength forces on all walls will feel as ifthe left and right walls have stronger forces. Thus, the upper and lowerwalls can be defined with stronger forces, e.g., two times the magnitudeof the left and right wall forces, to compensate for this effect. Suchan enclosure typically feels as if forces of all the walls are of equalstrength.

FIG. 6 c illustrates another use of enclosures. Enclosures can be usedwith events to provide some enclosures with priority over otherenclosures. The enclosure with priority can change the characteristicsof another enclosure, such as the strength of forces of the walls of theother enclosure. For example, window 272 is associated with a forceenclosure 274. The walls of enclosure 274 surround the borders 275 ofthe window and have an associated force to attract the cursor/userobject to the border. Buttons 277 are also included in window 272 whichare near the border 275 and which may be selected by the user. Buttons277 have their own enclosures defined in the interior of the buttons.The problem is that the forces from the enclosure 274 and the forcesfrom the button enclosures conflict. A user may not be able to selectthe button easily due to the cursor being stuck between competingenclosure forces.

Preferably, an enclosure 276 can be defined to control the effects ofother enclosures. For example, the enclosure 276 occupies a regionaround buttons 277 and is preferably not visible to the user. Enclosure276 turns off the forces of enclosure 274 inside its borders and leavesthe snap forces of the buttons 277 on. This allows the user to feel thesnap forces of the buttons without conflict from the forces of thewindow enclosure 274. Alternatively, the forces of enclosure 274 can bereduced inside enclosure 276 to an extent so that the user is notencumbered by competing forces. A similar type of enclosure can be useron sliders, where the moveable “thumb” of the slider can be providedwith an enclosure similar to enclosure 276 surrounding it. The enclosuresurrounding the slider turns off or reduces forces from other enclosuresand allows the snap attractive force of the thumb to attract the userobject/cursor to the thumb. Events can be used to determine when thecursor enters enclosure 276.

FIG. 7 illustrates a different effect useful in force feedbackapplications known as a texture. A texture is a condition, similar tofriction, which causes the mouse to feel as if it were traveling over aseries of bumps. FIG. 7 illustrates a distance vs. force graph in whicha number of bumps are defined with a coefficient C, a period T, and adeadband DB. Bumps in the positive distance region are felt when themouse 12 is moved in a positive direction, and bumps in the negativedistance region are felt when the mouse 12 is moved in the negativedirection. There is a separate height (coefficient) and period of thebumps for the positive and negative directions along a particular axisof the mouse 12 so that different textures can be felt depending on thedirection of the mouse. Directional textures can be used, for example,to achieve a velvet-like effect. The deadband value can apply for bothdirections. Textures are defined as a condition and can includeparameters such as:

Positive Coefficient, Negative Coefficient: Height (magnitude) of bumpswhen travelling along the axis in the positive or negative direction,respectively. Positive Saturation, Negative Saturation: Period, inpixels, of bumps (bump width plus deadband width) when travelling alongthe axis in the positive or negative direction, respectively. DeadBand:Percentage of period which is not occupied by a bump.

FIG. 8 illustrates a different force feedback effect useful in forcefeedback applications known as a grid. A grid is a condition thatcreates a 2-dimensional array of snap points 280, which are forcesattracting the user object to the point when the user object moves overthe point. Grids can be stand-alone conditions, but they can also beuseful when associated with enclosures. The geometrical attributes of agrid inside of an enclosure 282 are depicted in FIG. 8. Grids aredefined as a condition and can include parameters such as those below,also illustrated in FIG. 8.

Offset (O): If the grid is inside of an enclosure, defines thehorizontal and vertical distance, in pixels, from the upper left cornerof the enclosure's deadband to the first snap point. If the grid isstand-alone, defines the horizontal and vertical distance, in pixels,from the upper left corner of screen to the first snap point.

Positive Coefficient (C): Strength of snap points (jolts).PositiveSaturation (S): Saturation of snap points.DeadBand (DB): Vertical and horizontal spacing, in pixels, between snappoints.

Grids can also be implemented as one-dimensional forces, e.g., as tickmarks on a slider or any other graphical object when moved. The tickmarks would only be felt when the mouse was moving in the defineddimension. For example, a slider can be defined with a one-dimensionalgrid so that, as the knob of the slider is moved, a snap point isapplied as the knob moves over each tick of the grid. The ticks thushave a spatial correlation with the distance that the knob has moved andinform the user of such.

Events

One structure used by the host in force feedback implementation iscalled an “event.” Events are notifications from the force feedbackdevice to application programs 202, 204, and 206 of one or more actionsor interactions that have occurred in the graphical environment whichhas been sensed by the force feedback device 11. For example, an eventcan be any interaction of the cursor in the graphical environment withanother object. Thus, an event can be defined when the cursor entersinto an enclosure object (described below) through a particular border.Alternatively, an event can be triggered when the cursor moves over aclose box of a window, or the cursor moves over a file icon and a buttonis pressed. An event can also be defined when the cursor moves within aspecified range of a particular graphical object or region. Also, anevent may be defined with a temporal component, e.g. an event istriggered when the cursor remains in a particular region for a specifiedperiod of time. Events are similar to button press triggers in that acondition is detected on the force feedback device, independently of thehost; however, the trigger for an event is a graphical interactionrather than a physical button press.

An application program initially defines what the event is by creatingan event definition with the API 208. The event definition preferablyincludes an event identifier, an application program (or window)identifier, information specifying actions that trigger an eventnotification, and force effects, if any, that the event is associatedwith. The application program assigns a separate identification value toeach event at the time of creating the event, and keeps track of thecreated identification values in its own list. The API can enable,disable, or delete an event at the request of an application program.

The translation layer receives and stores events when the applicationthat created the event is the active or background application program.Thus, events are preferably included in the active context. Thetranslation layer preferably checks for events based on the position ofthe cursor (or mouse) received from the force feedback device when theassociated application program is (or becomes) active. The translationlayer then sends the event notification up to the context driver (orAPI), which sends an event notification to the application program, e.g.sends a message to a window handler which the application programchecks. The event notification includes the event identifier so that theapplication program can check its own list and identify the event. Onceidentified, the application program initiates the appropriate responseas defined by the developer, e.g. running another application program,outputting a sound, displaying a new image, etc. Alternatively, theforce feedback device is loaded with the defined event similar to beingloaded with effects. The local microprocessor 130 can check for events(for active application programs) and send information back through thetranslation layer to the context driver to notify the applicationprogram.

For an application program to receive an event notification, theapplication's context must be active, i.e., the application must beactive or background. Thus, inactive applications will not receive eventnotifications. Some events can be defined to have priority over otherevents. For example, if a trigger is associated with an event in aforeground context as well as an event in a background context, theforeground context can be defined to have priority so that only theapplication program in the foreground receives an event notification.Alternatively, only the background application, or both the foregroundand background applications, can receive the event notification.

Preferably, both one-time event triggers and periodic event triggers areavailable. One time event triggers are triggers associated with discreteactions that have no significant duration, such as breaking through anenclosure. Periodic event triggers are associated with conditions thathave a finite duration, such as being inside the wall of an enclosure,or holding down a scroll button. During the duration of the conditionwhich triggers the event (e.g., while the cursor is inside theenclosure), the API repeatedly sends event notifications to theapplication program according to a predetermined periodicity that can beset by the application program.

As an example, an application program creates an event definition for anenclosure event. This is an event that occurs when a user moves thecursor into an enclosure. The event definition includes a unique eventidentifier, an identifier for the application program that created it,actions that trigger the event notification (entering the enclosure),and any effects (such as the particular enclosure) which the event isassociated with.

An example of an event structure is provided below:

EVENT typedef struct { DWORD dwSize; HWND hWndEventHandler; WORD wRef;DWORD dwfTrigger; LPI_EFFECT pEffect; } EVENT;dwSize: Size of the structure in bytes. This member must be initializedbefore the structure is used.hWndEventHandler: Handle of window to which event notifications aresent.wRef: 16-bit application-defined value to identify the event. This valueis defined by the application to identify events that it has created.The application assigns a separate wRef value to each event at the timeof creation. Each subsequent event notification that the applicationreceives will be tagged with its associated wRef value. When theapplication processes the window message that receives eventnotifications, it will compare the wRef value to it's own internal listand take action accordingly.dwffrigger: Flags specifying actions that trigger the eventnotification.pEffect: Particular effect (e.g. enclosure), if any, in the GUI thatthis event is associated with.

The following are examples of flags that can be included as triggers foran event.

ONENTERTOP, ONENTERLEFT, etc.: The mouse broke into the associatedenclosure by breaking through the top, bottom, left, or right wall, asspecified.ONEXITTOP, ONEXITLEFT, etc.: The mouse broke out of the associatedenclosure by breaking through the top, bottom, left, or right wall, asspecified.ONENTERANY, ONEXITANY: The mouse broke into or out of the associatedenclosure.INBOUNDTOPWALL, INBOUNDLEFTWALL, etc.: The mouse is in the top, bottom,left, or right wall, as specified, and attempting to break into theassociated enclosure. OUTBOUNDTOPWAL, OUTBOUNDLEFTWALL, etc.: The mouseis in the top, bottom, left, or right wall, as specified, and attemptingto break out of the associated enclosure. INBOUNDANYWALL,OUTBOUNDANYWALL: The mouse is in a wall and attempting to break into orout of the associated enclosure.ANYWALL: The mouse is in a wall of the associated enclosure.ONSCROLL: The user is holding down the scroll button of the mouse.ONEFFECTCOMPLETION: The associated effect has completed.

The host computer or force feedback device may also command the mouse 12to act as a different type of control device for some embodiments. Theforce feedback device 11 is primarily intended, in the embodimentdescribed in FIG. 2, to be used in a graphical environment such as aGUI, in which multi-tasking applications are provided. When the forcefeedback device is used as such, the API 208 and other layers describedabove are preferably used. However, the force feedback device can alsobe used as a different type of controller and may use other standardAPI's. For example, the mouse force feedback device 11 as shown in FIG.2 may also be desired to be used in conjunction with game applicationprograms, simulations, or the like, in which a joystick or other type ofcontroller is typically used. Device 11 can be configured to work withsuch game applications in a “joystick mode” as if it were a standardforce feedback joystick, or as if it were a non-force-feedback joystick.The user can be provided with a physical switch on the device 11 toswitch from mouse to joystick mode, or a software switch provided inmaster application 206 or other program on the host computer can be usedto switch modes. For example, when the device is in the joystick mode,the host computer can use the DirectX API from Microsoft Corp. whichincludes force feedback functionality for standard joystick controllers.The device 11 becomes an absolute position reporting device in joystickmode.

Mouse device 11 as shown in FIG. 2 is not easily applicable to manyapplications intended for use with a joystick, since the mouse is aplanar device having a free workspace while a joystick typically hasrotary degrees of freedom and springs to bias the joystick to a centerposition. Thus, forces are preferably used to cause the mouse to be moresimilar to a joystick. When the mouse device 11 is used in the joystickmode, in the preferred embodiment, spring forces are applied to bias themouse 12 toward the center of its workspace. These forces are applied byactuators 64 and controlled by the local microprocessor 130 asbackground forces that are always in effect, unless the device isswitched out of joystick mode.

Force Feedback Device Implementations

The force feedback interface device 11, as described above, preferablyincludes a local microprocessor 130 that implements various processes toprovide the functionality and features of the force feedbackimplementation described herein. Various aspects of the force feedbackdevice implementation are described below.

Reference Frames

The force feedback mouse device as described herein needs the ability toknow the location of the cursor on the display device of the hostcomputer. This is because the device must monitor the interaction of thecursor with other objects in the graphical environment to determine whenassociated forces should be output. The force feedback device usesdifferent reference frames to determine where the cursor is positioned.There are three primary reference frames that are described herein: thedevice (or local) frame 30, the ballistic frame and the screen (or host)frame 28.

The device frame is the frame of the physical workspace of the forcefeedback device. In a preferred embodiment, the device frame is definedwith the origin at the top left, the positive x direction to the rightand the positive y direction down. This frame is used to describe theabsolute position of the end point of the mechanism in its workspace.The scale of “movement units” for the device frame is arbitrary andfixed, although it should be a higher resolution than the resolution ofsensors 62 to guarantee no loss of sensor data. Furthermore, in thepreferred embodiment, the device position is scaled to reflect a 4:3aspect ratio, which matches the preferred mechanical design (guideopening 76) as well as the typical computer monitor size. However, indesigns having different-sized mechanical workspace, the device frame isscaled to the provided mechanical workspace.

In the preferred embodiment, rate-control indexing is provided. Thisallows the mouse 12 to reach the limit to its workspace and stillcontrol the cursor in the same direction. In brief, the central portionof the device workspace is designated as the position control region,where a change in position of the mouse in its workspace directlycorrelates to a change in position of the cursor on the screen. Thechange in device position is translated to a change in ballisticposition based on the velocity of the device, according to a ballisticsalgorithm (described below).

An edge region of the device frame is designated as the rate-controlregion, in which the mode of moving the cursor changes from positioncontrol, to rate control, where the cursor continues to move on thescreen in the same direction while the mouse is in the rate controlregion. The rate control region boundary is accompanied by a repellingforce that pushes the user object towards the center of the deviceworkspace. As the user pushes against this force the cursor is moved ina speed proportional to the distance the device is displaced into therate control region. Therefore, the cursor moves relative to deviceposition in the rate control region, not relative to device motion. Thismode may be thought of as moving the position control central area ofthe device frame around the screen using rate control. This type ofindexing is described in greater detail in co-pending U.S. patentapplication Ser. No. 08/924,462. The size of the rate control region isspecified by a percentage. For example, a 400×300 device workspace has arate-control region of 10%. The cursor position would be determinedaccording to a position control paradigm when the user object positionis read between the values of (x,y)=(20, 15) and (380, 285) of thedevice frame, and according to a rate control paradigm if the userobject position is outside of that range.

The screen frame is used to describe the position of the cursor (orother user-controlled graphical object) on the screen. It is definedwith the origin at the top left, the positive x direction to the rightand the positive y direction down. This frame is scaled corresponding tothe resolution of the display device 20 (or devices 20). For example, ifa computer monitor resolution is set to 1024×768 pixels, the x screenposition ranges from 0 to 1023 as the cursor moves to the right and from0 to 767 as the cursor moves down. All coordinate communication betweenthe force feedback device and the host computer are in terms of screencoordinates (normalized for device standards).

The ballistic frame (or “scaled frame”) is a frame created by the forcefeedback device to determine cursor position. By applying a ballisticsalgorithm to the change in position of the user object, the cursorposition is determined. The ballistic frame is defined as a multiple ofthe screen frame, i.e., the ballistic frame preferably has a higherresolution than the screen frame, but has the same aspect ratio as thescreen frame. The ballistic frame is created by the force feedbackdevice so that pixel changes smaller than one screen pixel can be madeto the cursor position, which is crucial when implementing the fastcontrol loop rates demanded by force-feedback. For example, if thecontrol frequency is 1 kHz, and a monitor provides 1000 pixels across, achange of 1 pixel per control cycle would cause the cursor to travel theentire screen width in one second. In rate control mode, suchadjustments in cursor position may have to be made every control cycle,which is far too fast to allow control of the cursor. Thus, a frame withhigher resolution, the ballistic frame, needs to be defined to allow theforce feedback device to change cursor position at its own controlfrequency, but which can be divided down to the screen frame size toslow down the cursor as it is moved across the screen. In addition, theaspect ratio of the ballistic frame is the same as that of the screenframe. This allows force effects on the device to spatially correlatewith graphical objects displayed on the display device. This isdescribed in greater detail below.

The microprocessor must make transformations between frames to convert adevice position to an eventual screen coordinate. When transforming fromthe device frame to the ballistic frame, the microprocessor may usesensitivity. Sensitivity is the ratio of the size of the device frame tothe size of the ballistic frame. A higher value of sensitivity allowsthe cursor to traverse the screen with less physical motion of the mouse12, thus causing the cursor to be harder to control. A lower value ofsensitivity allows more motion on the device to cause less motion of thecursor on the screen, and is suitable for fine cursor control. At lowsensitivity values, the cursor may only be able to reach the entirescreen area by using rate control mode.

In the preferred embodiment, the cursor can exactly move across theentire width of the screen as the mouse 12 moves across the extent ofthe position control region of the device workspace, as long as thevelocity of the mouse 12 remains in a middle range to provide aone-to-two ballistic mapping (a one-to-one ballistic mapping is providedwith velocities in the lower range, causing less cursor movement; and aone-to-four ballistic mapping is provided with velocities in the highrange, causing more cursor movement). As sensitivity is increased, thescreen can be traversed in less than the entire position control regionof the device workspace (assuming a middle range velocity). At lowersensitivities, the entire screen cannot be traversed (assuming a middlerange velocity) without using the rate control mode.

Since the aspect ratios of the device frame and the ballistic frame maynot match, updating position changes in the ballistic frame may requirethat a change in device position (or a simulated change, when in ratecontrol mode) be added to the ballistic frame. If changes in mouseposition are always used, problems with different aspect ratios areeliminated. This is described in greater detail below.

Transforming from the ballistic frame to the screen frame is simpler.Once the ballistic cursor position is known, the cursor position in thescreen frame can be found by dividing the ballistic cursor position bythe known multiple. Thus, if the ballistic frame is defined to be 10times the resolution of the screen frame, the ballistic position isdivided by 10 to obtain the screen position.

Position Reporting

Standard mouse controllers are open-loop devices which report positionchanges of the mouse in its workspace to the host computer and have noability to know the current cursor position. The force feedback mousedevice, in contrast, needs to know the location of the cursor on thedisplay device of the host computer, since the mouse device must monitorthe interaction of the cursor with other objects in the graphicalenvironment to determine when associated forces should be output.

There are two primary means for a force feedback mouse to report theposition of the mouse to the host and to know the screen position of thecursor. The first, preferred method for the mouse to know cursorlocation is for the mouse to report (normalized) absolute coordinates tothe host computer to dictate the position of the cursor. For example,the actual screen coordinates of cursor can be determined by the mouseand reported to the host, and the host simply displays the cursor at thereported coordinates. This allows the mouse to know exactly where thecursor is at all times, and to therefore have an accurate model of thescreen for use with outputting forces. However, any ballistic behaviorof the cursor must be calculated on the mouse device itself, creatingmore calculation overhead for the local microprocessor 130. In addition,an absolute reporting scheme is not compatible with traditional,non-force-feedback mouse devices, thus excluding a default mode in casethe force feedback functionality is not operational.

A second method provides a force feedback mouse device that reportsposition changes of the mouse in its workspace, as a standard mouse doestoday, rely on the host computer to send back the cursor position. Thisapproach allows the host software to maintain the job of doing cursorballistics, but requires twice the communication as well as a need forthe mouse to predict intermediate values of cursor position whilewaiting for the next host cursor position update, since the cursorreporting occurs at a slower rate (e.g. about 50-60 Hz) than the hapticcontrol rate (e.g. about 1000 Hz). This embodiment is described ingreater detail with respect to FIG. 13.

The processes described below are preferably implemented as firmware inintegrated circuits and memory provided on the force feedback device.Alternatively, the processes can be implemented as hardware or software,or a mixture of these. The processes themselves can be implemented usingprogram instructions or code stored on or transferred through a computerreadable medium, such as a memory chip, circuit or other device;magnetic media such as hard disk, floppy disk, or tape; or other mediasuch as CD-ROM, DVD, PCMCIA cards, etc. The program instructions mayalso be transmitted through a channel to device 11 from a differentsource.

FIG. 9 is a block diagram illustrating a first preferred embodiment 290.In this embodiment, both relative and absolute position reporting modesare used. As referred to herein, relative position reporting means thatthe force feedback device reports only changes in position of the userobject 12 to the host computer, i.e. a difference between a new positionand the last reported position, while absolute position reporting meansthat absolute coordinates are reported to the host from which the hostcan directly display the cursor or other graphical object. Most forcefeedback controllers use absolute position reporting since the positionof the cursor on the screen must be known to implement forces. Forexample, the force feedback mouse and other interface devices describedin U.S. Pat. Nos. 6,219,032, 5,825,308, and 6,100,874 use absoluteposition reporting.

One problem with absolute position reporting is that the host computercannot detect the force feedback device as a standard input controller,such as a mouse. If relative position reporting were provided, the hostcomputer can detect the force feedback mouse as a traditionalnon-force-feedback mouse. This is desirable when force feedbackfunctionality is not currently active to allow the user to selectoptions within the operating system, such as during startup of thedevice before force feedback drivers have been loaded or duringemergencies when force feedback is not enabled.

The present embodiment provides a relative positioning mode when theforce feedback device 11 is powered up or when the host computer 18first detects the force feedback device. In this mode, the device 11provides a device delta position to the host as shown in FIG. 9. Thehost is expecting to receive a delta value upon startup, and thus simplyprocesses the delta position normally. This allows the user to use thedevice for normal positioning of the cursor in a GUI or graphicalenvironment before force functionality has been initialized. Themicroprocessor does not need to model the cursor position in this stageof the process because no force feedback functionality has yet beenenabled on the device 11. However, once the force feedback functionalityis enabled, e.g., the force feedback driver software has been enabled onthe host computer, then an absolute position is reported to the host inplace of the delta position relative position reporting. In addition,ballistic parameters and the host screen size are sent to the device 11to allow the device 11 to determined the absolute cursor position. Forcefeedback commands are also sent to the device in this stage whenappropriate.

FIG. 10 illustrates a process 300 for providing force feedback accordingto the preferred embodiment 290 of FIG. 9. In a first branch of process300, current joint angles 302 are measured by sensors of the forcefeedback device 11. For example, in the embodiment of FIGS. 1 and 2, thejoint angles between members 44, 46, 48, and 50 are determined based onthe current position of the encoder arc as sensed by the emitter anddetector of sensor 62. The joint angles can be determined since theprecise measurements of the members of linkage 40 are known and are in aknown position relative to each other based on the sensor 62 reading. Ina process step 304, the current joint angles are normalized based on thesensed range of the mouse 12 in its degrees of freedom. Since the exactrange of the mouse 12 (or other user object) may not be precisely knowndue to variations in the device or other irregularities, thenormalization process uses a sensed range of motion to determine andassign physical angles between the members of the linkage 40. Forexample, the minimum sensor value that has been detected so far isconsidered to be one limit of the motion of the mouse, and the maximumsensor value detected so far is considered to be the other limit to themouse range. In successive iterations of the process 300, the mouseeventually will be moved to the physical limits of the device and theangle values will be updated accordingly. This tends to produce moreaccurate results than an assumed range of motion, since manufacturingtolerances of the components of device 11 provide slightly varyingdimensions, link lengths, and angle ranges that cause discrepancies fromdevice to device. In an alternate embodiment, the force feedback device(microprocessor 130) can control the actuators of the device to move themouse 12 to all the limits of the mouse 12 in a short start-up procedureto determine the actual angle ranges.

The normalized joint angles 306 resulting from step 304 are thenprocessed by applying kinematics in step 308. Kinematic equations, as iswell known to those skilled in the art, are used to derive a position ofa desired point on a mechanical linkage or other apparatus from knownlengths of links in the linkage and the current angles between thoselinks. For example, a Cartesian position of a point on the linkage in aCartesian (or other type) of coordinate system can be determined usinggeometrical equations. A current device position 310 is determined fromthe kinematics of step 308, which is the position of the mouse 12 in itsworkspace.

The current device position 310 is used, with a previous device position312, to determine a device delta position 314. The previous deviceposition 312 was the current device position 310 in a previous iterationof process 300; this is indicated by the dashed line 311 between currentand previous device positions. The device delta position 314 is simplythe difference between the current device position 310 and the previousdevice position 312. In step 316, the microprocessor 130 sends thedetermined delta position 314 to the host computer 18 over bus 120. Thisis a relative position reporting step and is only performed if thesystem 10 does not yet have force feedback functionality, e.g. atstartup when the force feedback drivers are being loaded. The hostcomputer uses the delta position to position the cursor on the screen ofdisplay device 20. For example, the host computer adjusts the positionof a cursor by the delta amount to achieve a new position of the cursorin the screen frame 28. During relative position reporting mode, thedelta position 314 is sent to the host at a slower rate than the rate ofprocess 300; therefore, in some iterations of process 300, the deltaneed not be reported to the host. This is because the host only needs toreceive a cursor delta position at the rate of displaying the cursor onthe screen, which typically is on the order of 60 Hz or every 20 ms. Themicroprocessor 130, on the other hand, must control forces at a muchhigher rate (1000 Hz or above) and thus needs to execute process 300much faster.

If the device is in relative position reporting mode, the processiteration is complete after the delta position 314 is reported to thehost. The process then returns to measure joint angles 302 and start thenext iteration when triggered to do so. The microprocessor does not needto model the cursor position in this mode because no force feedbackfunctionality has yet been enabled on the device 11.

Relative position reporting mode is exited and absolute positionreporting mode is entered when the appropriate software drivers or otherprograms are loaded into the memory of host computer 18 to allow thehost to recognize, interface with, and command the force feedback ofdevice 11. In absolute position reporting mode, the delta position 314continues to be determined as described above. However, the deltaposition is no longer reported directly to the host computer, but isinstead used in a ballistics process to determine a ballistic delta,described below.

In absolute position reporting mode, the force feedback device 11 alsodetermines a velocity of the user object 12 for use in the presentprocess in addition to the joint angle processing described in steps 304and 308. A current joint velocity 320 is first measured. In thepreferred embodiment, this is accomplished by a dedicated circuit ordevice that determines a velocity from the sensed positions reported bysensors 62, e.g. the sensed positions of members 44 and 48. For example,a “haptic accelerator” device can include a circuit dedicated tocalculating velocity from multiple sensed positions and time periodsbetween the sensed positions. Such an embodiment is described in greaterdetail in U.S. Pat. No. 5,999,168. Alternatively, velocity sensors canbe used to directly measure velocity of joints or members of the device.

The current joint velocity 320 is used in a process step 322 which useskinematics in determining device velocity. As described above,kinematics are well-known equations for determining position, and alsoare used to determine a velocity of a desired point of a linkage. Thus,the kinematics can be used to determine the velocity of the mouse 12,which is referred to as the “device velocity” herein. The current devicevelocity 324 resulting from step 322 indicates the current velocity ofmouse 12.

Ballistics step 328 uses a ballistic algorithm or similar method tomodel or predict a position of the cursor in the screen frame 28 basedon the position and velocity of the mouse 12. This modelling isaccomplished to allow the local microprocessor 130 to determine wherethe cursor is positioned in the ballistic frame. Using the spatiallayout of graphical objects that is stored locally in memory 134 andwhich is continually updated by the host, the local microprocessordetermines when the cursor is interacting with an object and when tooutput forces associated with the interaction. The local determinationof the cursor position allows the microprocessor to know the position ofthe cursor for the determination of forces.

In the ballistics step 328, the local microprocessor uses a ballisticsalgorithm to determine a “ballistic delta” for the cursor, i.e. a changein position of the cursor measured in the ballistic frame. A ballisticsalgorithm is a method of changing the position of the cursor so as tobreak the direct mapping between the mouse 12 position and the cursorposition to allow the user greater control over the cursor position. Forexample, most ballistics algorithms vary the position of the cursorbased on the velocity of a mouse in its workspace. The faster thevelocity of the mouse, the greater the distance that the cursor is movedon the screen for a given distance the mouse is moved. This allows slowmotions of the mouse to finely control the cursor, while fast motionscoarsely control the cursor and allow the cursor to be moved quicklyacross the screen. Other algorithms can also be used which are similarto ballistics in that cursor position is altered to allow fine cursorcontrol in situations when needed (such as for targeting graphicalobjects with the cursor) and to allow coarse cursor control when needed.Ballistics and other methods of such enhanced cursor control aredescribed in greater detail in co-pending application Ser. No.08/924,462 and can be used.

The microprocessor 130 preferably uses a ballistic algorithm thatprovides two velocity thresholds to determine how far the cursor is tobe moved. This is described in greater detail below in the method ofFIG. 11. Other ballistics algorithms may be used in other embodiments;e.g., a continuous algorithm that adjusts cursor position continuouslyalong a range of mouse velocity.

The microprocessor uses several types of data to determine the ballisticdelta of the cursor, including the device delta position 314, currentdevice velocity 324, and host ballistic parameters 330. The hostballistic parameters 330 are received by the microprocessor 130 from thehost at some point before the process 300 starts, or when the ballisticmodel changes, and are stored in local memory 134 to be accessed whenrequired. Such parameters can include the distance to move the cursorfor each threshold range of device velocity, the velocity values of thetwo thresholds, and any conditions concerning when to apply theballistics algorithm. If the host changes ballistics algorithms,notification can be sent to the microprocessor 130 and new parametersstored in local memory 134. The microprocessor 130 examines the currentdevice velocity 324 and the parameters 330 to determine in whichthreshold range the mouse velocity currently is placed, and thenmultiplies the device delta position by the appropriate amount (e.g., 1,2, or 4, depending on the velocity). This results in the ballistic delta332, which is provided in terms of the ballistic frame. Changes in mouseposition (i.e., delta positions 314) are used in the absolute positionreporting mode because this allows problems with changes to screenaspect ratios and resolutions to be alleviated. In addition, an indexingfunction of the device 11 is preferably implemented which may cause theballistic delta 332 to be calculated differently in a rate control mode,as detailed below in FIG. 11.

The microprocessor then proceeds to a process step 334, in which acurrent ballistic location (or “scaled position”) 336 of the cursor isdetermined in the ballistic frame. To accomplish this, themicroprocessor uses the ballistic delta 332, and the previous ballisticlocation 338. The previous ballistic location 338 was the currentballistic location 336 in an earlier iteration of process 300, asindicated by dashed line 337. Previous location 338 can be stored inlocal memory 134 and then discarded after being used to determine thecurrent ballistic location. At its simplest level, the current ballisticlocation 336 is determined in step 334 by taking the previous ballisticlocation 338 and adjusting that location by the ballistic delta 332.

The current ballistic location 336, however, cannot be directlytransformed to a screen pixel position in the screen frame. Step 342uses the current ballistic location 336 and the host screen size 340 todetermine the screen pixel location.

The host screen size 340 is the current pixel resolution and/or aspectratio being displayed on the display device 20 of the host computer 18.For example, the host may be displaying a screen resolution of 800×600pixels, 1024×768 pixels, or 1280×960 pixels. Also, in some embodiments,the host may be displaying a different aspect ratio. For example, atypical computer monitor aspect ratio is 4:3; however, if two monitorsare connected to provide a continuous screen space, the aspect ratiobecomes 8:3. i.e., double the size of a single screen in one dimension.The host screen size 340 can be received by the device 11 when theballistic parameters 330 are received, or at any other time (and/or whensensitivity information is received, if applicable). Differentresolutions or aspect ratios have different numbers of pixels inrespective dimensions of the screen and thus cause displayed objects toappear in different areas of the screen. For example, if a graphicalobject is centered in the screen at 640×480 resolution, the object willappear in the upper left quadrant of the screen when the resolutionchanges to 1280×960.

The change in resolution or aspect ratio can create a problem with forcesensations created by the force feedback device. The device has beensent a spatial layout of objects from the host that indicates thecoordinates of an object on the screen. When the screen size is changed,and the device is not informed, the device will output forcescorresponding to the object as it appeared in the old screen size. Thiscan cause large discrepancies between where an object is displayed andwhere the forces of an object are encountered in the device workspace.For example, if an icon is at coordinates (64, 48) on a 640×480resolution screen, the device knows that the icon is positioned 10% ofthe entire screen dimension away from the top and left borders of thescreen workspace. The device accordingly outputs associated forces whenthe mouse is moved into the region of the device workspace correspondingto the icon, i.e. 10% of the workspace distance from the top and leftborders of the workspace. However, after a resolution change to1280×960, the icon is displayed 5% of the screen dimension away from thetop and left borders. The device, however, would output forces based onthe old position of the icon, which no longer corresponds with theposition of the icon. Thus, the device needs to be told the new screenresolution so it may provide forces at the appropriate region of thedevice workspace.

Similarly, a change in aspect ratio can cause distortion in the forcefeedback sensations. For example, a circle object is displayed on a 4:3aspect ratio screen and has a force wall surrounding its shape. Thecircle will feel like a circle on the device if the ballistic frame alsohas an aspect ratio of 4:3. However, if another monitor is activated sothat the screen has an 8:3 aspect ratio, the circle object will feellike an oval due if the screen is directly mapped to the device frame,i.e. if the device frame is “stretched” to fit the screen frame. The useof delta positions 314 prevents this distortion. Since only changes inthe mouse position are used to determine cursor position, and not anabsolute mouse position in the device workspace, the cursor ispositioned without distortion. However, the new aspect ratio still needsto be communicated to the force feedback device since there is a largerarea in which the cursor may be positioned. For example, in a 4:3 aspectratio, the microprocessor might clip a pixel location to the edge of thescreen if that location were beyond the edge of the displayed range.However, on an 8:3 aspect ratio, the location should not be clippedsince the displayed range is larger.

To prevent distortion caused by a change in screen size, the ballisticlocation 336 of the cursor is divided by a divisor that takes the hostscreen size into account. For example, if the ballistic frame is 10times the resolution of the screen frame, then the divisor is 10: theballistic location 336 would be divided by 10 to achieve a screen pixelposition of the cursor if the host screen size had not changed. If thehost screen size did change, then the ballistic frame is resized to takethe new screen size into account. Preferably, the screen pixel positionis equal to the screen size times the ballistic location divided by theballistic frame size (i.e. the divisor). Thus, if screen resolution onthe host has doubled, the divisor would halve, and the screen pixellocation would double. The host can also send sensitivity information tothe device. If a new sensitivity value is received, the ballistic frameis resized accordingly; as sensitivity is increased, the ballistic framesize is decreased.

Once the screen pixel location is translated from the ballistic position336, the screen pixel location is then typically normalized to astandardized range of numbers since communication software and deviceshave standard values to receive. The normalized screen pixel position346 is then sent to the host computer as an absolute position in step350, e.g., as coordinates for display on the screen. The host receivesthe screen pixel location 346 and displays the cursor appropriately.

In step 344, the local processor 130 uses the (preferablynon-normalized) screen pixel location (and other data) to determinewhether any forces should be output, and outputs those forces. Forexample, the local microprocessor checks the spatial layout of graphicalobjects which is stored in local memory 134 and determines whether thescreen pixel location intersects or contacts any of those objects. Ifso, there may be a force associated with the interaction, depending onthe graphical object intersected. Such a force would be calculated basedon a variety of data. Such data may include the device velocity 324, thedevice position 310, the elapsed time from an event, the distance from adifferent graphical object in the graphical environment, a history ofpast mouse motion, etc. Some examples of forces that can be output in agraphical environment are described in U.S. Pat. Nos. 6,219,032 and5,825,308.

Once step 346 is complete (and any other desired steps in the provisionof forces, which is not detailed herein), the process when neededreturns to the measuring of joint angles 302 and joint velocity 320 tobegin another iteration of the absolute position reporting process.

No error correction is required in the present embodiment, unlike theembodiment below, because the force feedback device 11 is operating inabsolute mode when the pixel position is determined. The host is nolonger receiving simply a change in position (delta) of the user object,but is receiving an absolute coordinate in a coordinate system and needperform no other significant processing (such as ballistics) to displaythe cursor, i.e., the local microprocessor solely performs the necessaryadjustments, such as ballistics, and reports the adjusted position tothe host computer. Thus, the host and local microprocessor have the sameposition value for the cursor, and no opportunity exists for the twopositions to diverge.

FIG. 11 is a flow diagram illustrating a method 360 for implementingenhanced cursor control and indexing in the absolute position reportingmode of method 300. This method provides ballistics for cursorpositioning as well as indexing functionality, and many of the steps ofmethod 360 overlap those of method 300. As described above, the mouseworkspace preferably includes a central position control region in whichthe mouse controls the cursor according to a position control scheme. Anisometric edge region is provided around the position control region ofthe mouse workspace. When the mouse is moved into the isometric region,a resistive force is applied to the mouse and the cursor is movedaccording to a rate control method, where the speed of the cursor isproportional to the amount of penetration into the isometric region.This allows a user to move the cursor throughout the screen framewithout causing the user to experience disconcerting interruptions dueto the mouse colliding with physical limits to the mouse workspace. Thisindexing method is described in greater detail in U.S. Pat. No.6,252,579.

The method 360 is similar to the indexing methods described above inthat a position control region and isometric edge region are provided inthe mouse workspace. Method 360 is intended to be used on the preferredembodiment 290 of FIGS. 9 and 10 and accounts for the use of a ballisticframe on the mouse and for changes in screen size.

Method 360 begins at 362, in which raw sensor data is read using thesensors 62. In step 364, the joint positions of linkage 40 arecalculated from the raw sensor data. In step 366, position kinematicsare used to determined the device position (position of the mouse 12 orother user object) in the device frame, as explained above withreference to FIG. 10. The last device position is stored in local memory134 in step 368, and a delta device position is determined in step 370using the current device position resulting from step 366 and the lastdevice position stored in step 368. From step 366, step 372 isinitiated, which checks whether the device position is in the positioncontrol region of the device frame. If not, the mouse is in theisometric region and is in rate control mode, where a resistive force ispreferably output on the mouse opposing movement into the region. Instep 374, the rate control delta is calculated to be the differencebetween the device position and the rate control edge; this provides thedistance of penetration into the isometric region. In step 376, the rateof cursor movement is equal to the maximum rate times the rate controldelta divided by the rate control edge width (i.e., the width of theisometric regionj. The rate control delta divided by the rate controledge width provides the percentage of penetration of the mouse into theisometric region, which is designated to be the same percentage of themaximum rate of the mouse. The maximum rate can be set by the developer;for example, 1000 ballistic pixels per second or 8000 ballistic pixelsper second. In step 378, the ballistic position (i.e. the position ofthe cursor in the ballistic frame) is set equal to the old ballisticposition plus the rate determined in step 376. The process thencontinues to step 394, detailed below.

If the device position is in the position control region in step 372,then a position control method is followed. Steps 384-392 implement apreferred ballistics algorithm to provide enhanced cursor control to theuser of device 11. This algorithm is generally as follows. If thecurrent device velocity is below the first threshold, the cursor ismoved by the smallest amount, e.g., a one-to-one mapping between devicemovement units and ballistic pixels. If the current device velocity isbetween the first and second thresholds, the cursor is moved double theamount of pixels as it is moved when mouse velocity is under the firstthreshold, e.g. a one-to-two mapping between device and ballisticframes. If the user object velocity is above the second threshold, thecursor is moved double the amount of pixels as between the first andsecond thresholds (a one-to-four mapping between device and ballisticframes). In other embodiments more or less thresholds, or a continuousfunction, can be used. Also, the host may change the ballisticsalgorithm in a variety of ways and indicate the changes to the device 11using ballistic parameters 330 as described for FIG. 10.

Thus, step 384 checks the device velocity so that a ballistic positionmay be determined. The device velocity is determined in steps 380 and382, where step 380 determines joint velocities from the sensor dataread in step 362 and device velocity is determined from the jointvelocities and velocity kinematics in step 382, as described above inFIG. 10. In step 384, this device velocity is compared to the ballisticthresholds used in the ballistics algorithm. If the device velocity iswithin the first ballistic threshold in step 384, then step 386determines the new ballistic position to be the old ballistic positionplus the delta device position (from step 370). The process thencontinues to step 394, detailed below. If the device velocity is greaterthan the first ballistic threshold, then in step 388 the device velocityis compared to the second ballistic threshold. If the device velocity isbetween the first and second thresholds, then in step 390 the newballistic position is set equal to the old ballistic position plus twicethe delta device position. This causes the cursor to move at a fasterrate, based on mouse velocity. The process then continues to step 394,detailed below. If the device velocity is greater than the secondballistic threshold in step 388, then in step 392 the new ballisticposition is set equal to the old ballistic position plus 4 times thedelta device position. The process then continues to step 394.

In step 394, the screen position of the cursor is set equal to theballistic position as determined in one of steps 378, 386, 390, and 392divided by a divisor. The divisor is known from the resolution of theballistic frame and the resolution of the screen frame, as follows. Instep 396, the screen resolution (or size) is obtained from the host. Instep 398, the divisor is set equal to the ballistic range (orresolution) divided by the screen resolution as detailed above.

After the screen position is determined in step 394, it is sent to thehost computer in step 399 and used in the display of the cursor in thescreen frame. The device II also determines and outputs forces, asdetailed in FIG. 10. It should be noted that the forces on mouse 12 maybe determined or calculated differently in rate control (isometric) modethan in position control mode, as described in greater detail in U.S.Pat. No. 6,252,579.

FIG. 12 is a block diagram illustrating a second embodiment 400 forreporting positions to a host computer from a force feedback device.Embodiment 400 provides only relative position reporting from the forcefeedback device 11 to the host computer 18. This is advantageous in thatthe force feedback mouse device is detected by the host as a standardnon-force-feedback mouse, where the host computer can use standarddrivers and other software. This allows the user to control GUIfunctions even when force feedback is not currently active, such asduring startup of the device or during failures of the force feedbackfunctionality. In addition, a relative position reporting process ismore appropriate than an absolute position reporting process for suchinterface devices as trackballs, in which an unrestricted workspace andrange of motion is provided for the user object 12. For example, thespherical ball in a trackball controller can be moved in any directionfor any number of revolutions and is not as suitable for use with anabsolute coordinate system as a device having a workspace with knownlimits.

Embodiment 400 provides a device delta position to the host computerfrom which the host computer determines a cursor screen pixel position.The host computer sends cursor position updates to the force feedbackdevice to provide the cursor position which the device needs todetermine when forces are output and to determine the forcecharacteristics. However, since the host cursor position updates occurat a much slower rate, the device must model the cursor position on itsown to be able to output forces between host cursor updates. Thus, thehost sends ballistic parameters and screen size information so thedevice can model the cursor position. When the device receives anupdate, it corrects for any error between its modelled position and theactual cursor position, as detailed below. The host also sends forcefeedback commands to the device indicate which forces are to be output.

FIG. 13 illustrates a process 410 for implementing the second embodiment400 of FIG. 12. A significant difference between method 300 and method410 of the first embodiment is that the host independently determines ascreen cursor position in the present embodiment in parallel with themicroprocessor modeling the cursor screen position. Since the hostcontrols the actual position of the cursor, its screen position isconsidered the “correct” or actual cursor position, while the devicemodeled value is only approximate. The host must continually send theactual screen position to the device so that errors in the modeledscreen position can be corrected and so that the forces can be correctlycorrelated with actual cursor position.

Process 410 includes many similar steps to process 300. The currentjoint angles 302 are measured and normalized in step 304, and thenormalized joint angles 306 are processed with kinematics in step 308 toprovide a current device position 310. The current device position 310and previous device position 312 are used to determine a delta position314, which is reported to the host computer 18 in step 316 over bus 120.As in process 300, this portion of the process 410 functions like atraditional relative mouse, where only a delta value is reported to thehost computer. However, unlike the process 300, the delta position 314is always reported to the host computer, i.e., there is no absoluteposition to report at any stage of the process. The host computer usesthe delta position to position the cursor or other user-controlledgraphical object on the display device 20. For example, the hostcomputer adjusts the position of a cursor using the delta amount and itsown ballistics algorithm to achieve a new position of the cursor in thescreen frame 28. The delta position 314 is sent to the host at a slowerrate than the rate of process 410; therefore, in some iterations ofprocess 410, the delta need not be reported to the host. This is becausethe host only needs to receive a cursor delta position at the rate ofdisplaying the cursor on the screen, which typically is on the order of60 Hz or every 20 ms. The microprocessor 130, on the other hand, mustcompute forces at a much higher rate (1000 Hz or above) and thus needsto execute process 300 much faster.

The current joint velocity 320 also is read in process 410 (both thejoint angles 302 and the joint velocity 320 are always measured in thecurrent process). Kinematics are applied in step 322 to obtain thecurrent device velocity 324, and ballistics are applied in step 328using the device velocity 324, ballistic parameters 330, and deltaposition 314 to obtain a “modeled” pixel delta 332. The pixel delta 332is a modeled or predicted value in this embodiment because the host hasdetermined the actual screen position using its own ballistics algorithmand using the delta position 314 provided by the device. Themicroprocessor 130 preferably uses in step 328 the same ballisticsalgorithm used by the host computer in its determination of cursorposition.

In step 412, a current pixel location is modeled using the modeled pixeldelta 332, a previous pixel location 416, and the host screen size 340,resulting in a current pixel location 414. Step 412 is similar to step334 of process 300 in that pixel delta 332 and the previous pixellocation 416 are used substantially similarly. The host screen sizeinformation can be used to determine whether the determined pixellocation should be clipped or not. For example, if the aspect ratio haschanged from 4:3 to 8:3, double the amount of area is provided. If thepixel location is one that would normally extend beyond the edge of a4:3 screen area, it would be clipped to the border of the 4:3 screen,but may not be clipped if it is still within the 8:3 area. In oneembodiment, if the change in screen size is to a different resolution,the current pixel location can also be adjusted depending on the changein resolution. For example, if screen resolution has been adjusted from640×480 to 1280×960, then the pixel delta can be doubled before it isadded to the previous pixel location.

Step 412 is different from step 334 in FIG. 10 in that a current pixelerror 418 is included in the determination of the current pixel location414. The pixel error 414 is the error between the cursor positionmodeled by the local microprocessor and the actual cursor position asdetermined and displayed by the host computer. Although themicroprocessor is typically applying the same ballistics algorithm andscreen size adjustments to the cursor pixel location as the hostcomputer, errors can be introduced to cause the two cursor locationcalculations to diverge. For example, in some embodiments, the hostcomputer can “clip” the received delta position 314, i.e., ignore thedelta position so that the cursor stays at a constant position. Such atechnique is used, for example, to provide realistic obstruction forcesensations when forces are limited in magnitude, as described in greaterdetail in co-pending application Ser. No. 08/664,086. Or, error can becaused by an application program on the host computer moving the cursorbased on the program's own criteria and completely independently of theforce feedback device. Or, error can be caused by the host computerswitching to a different ballistics algorithm, where a delay existsbetween the host using the new ballistic algorithm and the forcefeedback device receiving the parameters for the new algorithm.

The current pixel error 414 is determined by examining the current pixellocation 414 at the time of reporting the delta position 314 and acurrent screen position of the cursor that has been received from thehost computer. The host computer periodically reports a current screenposition 420 of the cursor to the microprocessor 130, where the screenposition is based on the delta position 314 reported to the host in step316. The reporting of the screen position by the host is triggered byreceiving the delta position 314 from the device, and the microprocessorrecalculates pixel error when it receives the host screen position 420.

The microprocessor compares the received screen position 420 with themodeled current pixel location 414 at the time of report 316 (it shouldbe noted that the current pixel location 414 may have apreviously-determined error correction value included in itsdetermination, as explained below). If the two locations are the same,no error exists between the two cursor positions, and the microprocessoruses the current pixel location 414 as the location of the cursor in itsforce calculations and force outputs. If the two locations are not thesame, error exists between the two cursor positions and the currentpixel location 414 must therefore be corrected. An error correctionvalue is determined as the difference between the current pixel location414 and the host screen position 420. This value, when added to (orsubtracted from) the pixel location 414, will cause the two cursorlocations to be the same. Alternatively, if the microprocessor knows theerror, then the current pixel location can be adjusted to provide noerror.

The screen position 414 from the host is reported to the microprocessor130 at a slower rate than the rate of process 410, since the forcefeedback process must be much faster than the displaying processes ofthe host computer. There may therefore be several iterations of process410 before the screen position 420 is reported by the host to themicroprocessor 130. Therefore, once the error correction value isdetermined after one report of screen position 420, that same value iscontinually used in iterations providing the determination of currentpixel location 414 until the next screen position 420 is received fromthe host.

In the preferred embodiment, it is desirable to “smooth out” thecorrection of the error in pixel location 414 by only incrementallychanging the pixel location 414 in each iteration of process 410. Forexample, if the current pixel location 414 were adjusted with the entireerror correction value at one time, this might cause a large change inthe pixel location 414. If forces output on the user object are based onthe current pixel location 414 of the cursor, then the user may noticethe correction of the error by feeling a small jump or discontinuity inthe forces applied to mouse 12 after the error is corrected. This isbecause the forces were determined based on a pixel location having alarge error at one point in time, and then the forces are based on thecorrected pixel location at the next point in time. Thus, the differencein pixel locations in each iteration is preferably smoothed by onlypartially correcting the current pixel location 414. With suchsmoothing, the user does not feel as large a discontinuity in forceswhen the error in pixel position 414 is corrected. The error correctionrate is preferably based on the desired system modeling. The error canbe corrected at a rate so that there is no error between the pixellocation 414 and the host screen position 420 by the time a new hostscreen position 420 is received (which may provide a new error, ofcourse). Or, the error can be corrected at a rate that spans multiplereceived host screen positions 420. Typically, the correction of errorsis desired to be as slow as possible to maintain high fidelity of forcesto the user, yet the error must be corrected fast enough so as not tocreate a discontinuity between what the host is displaying on thedisplay device and the forces the user feels on the force feedbackdevice.

FIG. 14 is a diagrammatic illustration of an example of the pixellocation error correction process explained above. The line 426represents a time scale, and each vertical mark represents anotheriteration of process 410. At the first iteration, the pixel location 414(PL) is determined to be 192 (assuming a single dimension of user objectmotion) and the error 418 between the pixel location and host screenposition is 0. At the next iteration, the pixel location is 200, and thedelta position of 4 is reported to the host as in step 316. Over thenext iterations, the pixel location is determined to be 200, 201, and202. At the sixth iteration, the pixel location is determined to be 203;in addition, the host reports a host screen position of 201. Since thisscreen position was determined based on the delta position 314 reportedto the host in the second iteration, the error is measured between thepixel location determined at the second iteration (200) and the hostscreen position received at the sixth iteration (201). The error valueof 1 is then included in the current pixel location, so that the pixellocation of 203 is corrected to be 204 based on the error value. Thisexample demonstrates that the pixel location 384 determined by themicroprocessor 130, when error exists, is corrected a few iterationsbehind the actual screen position determined by the host. Themicroprocessor 130 locally stores the pixel location 414 that wasdetermined in the iteration when the delta position 314 was reported tothe host so that the error correction value can be accuratelydetermined.

It should be noted that, in the example of FIG. 14, the error valuedetermined at the sixth iteration continues to be added indefinitely.Thus, if further errors are indicated at later host reports, the newerror value must be added to the old error value. FIG. 15 is adiagrammatic illustration of the error correction value increasing overtime. Initially the error correction value is 0, then 1. Over the nexthost report of the screen position, the current error is 2 pixels, whichis added to the previous error correction value of 1 so that the totalerror correction value is 3. Likewise, in the next host report, thecurrent error is 3 pixels, so that the total error correction value is6. In one embodiment, if a very large error accumulates, themicroprocessor can make the error zero in one iteration regardless ofthe effect on the user.

FIG. 15 also demonstrates the smoothing or incremental correction of themodeled pixel location. An error of 2 pixels exists at the iteration428. The value of 2 is not added to the previous error value of 1immediately, since that may cause a force discontinuity to the user.Instead the 2 pixels are added gradually to the error correction valueover the next few iterations. For example, the actual value (AV) addedto the pixel location 414 is 0 for the first two iterations afteriteration 428, then AV=2 for three more iterations, until the full valueof 2 is added in following iterations.

Referring back to FIG. 13, once the current pixel location 414 isdetermined, the local processor 130 uses that location in step 424 todetermine whether any forces should be output and outputs those forces.It should be noted that most forces are determined preferably based onthe velocity of the user object in its workspace, not the velocity ofthe cursor in the graphical environment. Thus, these forces will alwaysfeel the same to the user, regardless of any error between the modeledpixel location 414 and the host screen position 420, since they isindependent of screen velocity. However, some forces are dependent oninteractions in the graphical environment, and will be affected by acursor position error. Likewise, the ability to initiate or discontinueforces based on interactions in the graphical environment is alsoaffected by cursor position error.

Once step 424 is complete (and any other desired steps in the provisionof forces, which is not detailed herein), the process preferably returnsto the measuring of joint angles 302 and joint velocity 320 to beginanother iteration of the process.

Force Feedback Features

In the above described embodiments, the host computer performs suchtasks as the implementation and display of the graphical (or other)environment and cursor, the implementation of multi-tasking applicationprograms, the sending of high-level force feedback commands to the forcefeedback device, and the reception of position (or other) data from theforce feedback device indicating the user's desired interaction with thecomputer-implemented environment. The force feedback device, incontrast, performs such tasks as reading the position of the userobject, receiving high level force feedback commands from the hostcomputer, determining whether a force should be output based onconditions sent from the host computer, and implementing and outputtingthe required forces when necessary.

Some tasks, however, may be implemented in either the host computer orthe force feedback device, and there are different tradeoffs to choosingone implementation over the other. Events, for example, are one suchfeature. Another force feedback feature that can be implemented ineither the host or the force feedback device is “clipping.” Clipping isthe selective omission of reported position data when displaying thecursor or other user-controlled graphical object to cause a sensoryeffect on the user in certain circumstances. Such circumstances includethose where displaying the cursor in correlation with the precise userobject position would not provide a desired effect. The most common casefor clipping is when the cursor encounters a surface or object in thegraphical environment which is desired for the user to experience as ahard obstruction or wall. The wall is desired to prohibit furthermovement into the surface or object; however, due to limitations inhardware, a strong enough force cannot be output on the user object toactually prevent motion into the wall. Thus, clipping is performed: theuser object (e.g., mouse) is allowed to be moved by the user into thewall against a resistive force, but the reported position dataindicating this movement is clipped or ignored so that the cursor isdisplayed positioned against the wall surface where it first encounteredthe wall. The user sees the cursor prevented from moving into the walland feels a resistive force, and believes that it is a hard obstructioneven though the user object can actually be moved into the wall; this isbecause the user heavily relies on the visual perception of theinteraction. Clipping is described in greater detail in U.S. Pat. Nos.6,028,593 and 5,825,308.

Clipping can be easily performed by the force feedback device to easecomputational burden on the host. For example, the local microprocessor130 can check whether the user object is being moved into a wall in thegraphical environment; if so, the microprocessor can simply discard theposition data and report a constant position (or delta) to the hostcomputer that would cause the host to display the cursor against thewall surface. This allows the host computer to be completely ignorant ofthe clipping process and simply display the cursor at the reportedposition, thus freeing the host to perform other tasks. However,problems occur in this implementation due to extra burden on the localmicroprocessor. Since the microprocessor is implementing a very fastforce feedback loop in which the user object position is read and forcesare output, it is very disruptive to this loop when the microprocessorhas to check whether to clip the read position of the user object, andmay cause a small distortion in output forces.

The host computer 18 can also perform clipping in an alternateembodiment. Since it is desirable to keep the application programs 202and 204, the operating system, and other high level programs ignorant ofthe clipping process, a lower level program preferably handles theclipping. For example, the translation layer 218 as shown in FIG. 4 (oralternatively the context driver or API) can check for the conditionsthat cause clipping to be applied. If clipping is to be performed, thetranslation layer alters the input position data appropriately before itis sent on to the context driver, API, operating system and anyapplication programs. Problems with this implementation includeincreased load on the host with the overhead of intercepting andtranslating incoming messages.

A different force feedback feature that can be implemented either by theforce feedback device or the host computer is “pressure clicks” or“click surfaces.” As described above, these are surfaces, objects orregions in a graphical environment which have additional functionalitybased on the position of the cursor in relation to the object. Thus, aborder of a window can be designated a click surface such that if theuser overcomes a resistive force and moves the cursor (or user object)over a threshold distance into the border, a function is activated. Thefunction can be scrolling a document in the window, closing the window,expanding the window size, etc. A similar click surface can be used onan icon or button to select or activate the icon or button.

The force feedback device can implement click surfaces to easecomputational burden on the host computer. The local microprocessor cancheck whether the cursor has moved into an click surface or region andoutput the resistive force as appropriate. When the cursor is moved pastthe threshold distance, the microprocessor reports to the host computerthat the action associated with the click surface has been made; forexample, the microprocessor reports that a button press or double clickhas been performed by the user. The host receives a signal that a buttonhas been pressed and acts accordingly. Or, the microprocessor reportsthat a particular click surface has been specifically selected, wherethe host can interpret the selection and implement an associatedfunction.

The host may also implement at least a portion of the functionality ofclick surfaces. The microprocessor can output the resistive (or othertype) force associated with the click surface, but only reports the userobject position to the host. When the host determines that the cursor(or user object) has moved beyond the threshold distance, the hostimplements the function associated with the click surface (scrollingtext, closing a window, etc.) As with clipping, it is preferred that thetranslation layer handle this functionality by modifying dataaccordingly before passing it to the context driver and API.

While the subject matter has been described in terms of severalpreferred embodiments, it is contemplated that alterations, permutationsand equivalents thereof will become apparent to those skilled in the artupon a reading of the specification and study of the drawings. Forexample, although examples in a GUI are described, the embodimentsherein are also very well suited for other two-dimensional graphicalenvironments and especially three-dimensional graphical environments,where a user would like fine positioning in manipulating 3-D objects andmoving in a 3-D space. For example, the isometric limits are quitehelpful to move a cursor or controlled object in a 3-D environmentfurther than physical limits of the interface device allow.

In addition, many different types of forces can be applied to the userobject 12 in accordance with different graphical objects or regionsappearing on the computer's display screen and which may be mouse-basedforce sensations or cursor-based force sensations. Also, the variousfeatures of the embodiments herein can be combined in various ways toprovide additional embodiments. In addition, many types of user objectsand mechanisms can be provided to transmit the forces to the user, suchas a mouse, trackball, joystick, stylus, or other objects. Furthermore,certain terminology has been used for the purposes of descriptiveclarity, and not to be limiting. It is therefore intended that thefollowing appended claims include all such alterations, permutations,and equivalents as fall within the true spirit and scope of theinventive subject matter.

1. A haptic system comprising: first generating means for generating afirst force sensation in response to receiving a first signal; andsecond generating means for generating a second force sensation inresponse to receiving a second signal; wherein the first signal isassociated with a first application program, the first applicationprogram running during a first time period; and wherein the secondsignal is associated with a second application program, the secondapplication program running during a second time period that overlapswith the first time period in a multi-tasking environment.
 2. The hapticsystem of claim 1, further comprising: signal generating means forgenerating the first signal and the second signal; signal receivingmeans for receiving the first signal and the second signal; andtransmitting means for transmitting the first signal and the secondsignal to the signal receiving means.
 3. The haptic system of claim 2,wherein the first signal is generated only when the first applicationprogram is active in the multi-tasking environment, and the secondsignal is generated only when the second application program is activein the multi-tasking environment.
 4. The haptic system of claim 2,wherein the transmitting means comprises a network.
 5. The haptic systemof claim 4, wherein the first application program is a first computerprocess thread running on a network server, and the second applicationprogram is a second computer process thread running on the networkserver.
 6. The haptic system of claim 4, wherein the multitaskingenvironment comprises a plurality of networked computers.
 7. The hapticsystem of claim 1, wherein the first signal is a representation of afirst data set comprising one or more force effects associated with thefirst application program, and wherein the second signal is arepresentation of a second data set comprising one or more force effectsassociated with the second application program.
 8. The haptic system ofclaim 1, further comprising a wireless receiver configured to receivethe first signal and the second signal.
 9. The haptic system of claim 1,wherein the first generating means comprises a first haptic deviceadapted for use by a first user, and the second generating meanscomprises a second haptic device adapted for use by a second user. 10.The haptic system in claim 1, wherein the first force sensation isreplicated in a plurality of user interface devices, and the secondforce sensation is replicated in a plurality of user interface devices.11. A data structure embodied on one or more computer readable media,comprising: a first routine for storing a plurality of data sets inmemory, each data set comprising a representation of one or more forceeffects, wherein each one of the plurality of data sets is associatedwith one software application; and a second routine for selecting onedata set from among the plurality of data sets.
 12. A haptic systemcomprising: a moveable device; a first processor configured to operatein a first mode and a second mode, the first processor being configuredto send a first signal, wherein the first signal indicates absoluteposition information of the moveable device when the first processor isoperating in the first mode, and wherein the first signal indicatesrelative position information of the moveable device when the firstprocessor is operating in the second mode; and a force sensationgenerator configured to output a force sensation when the firstprocessor is operating in the first mode, the force sensation generatornot being configured to output a force sensation when the firstprocessor is operating in the second mode.
 13. The haptic system ofclaim 12, wherein the first processor is further configured to receive asecond signal from a second processor, and wherein the first processoris further configured to calculate the absolute position information atleast partially based on the second signal.
 14. The haptic system ofclaim 12, wherein the first processor is further configured to calculatethe absolute position information at least partially based on theballistic parameters.
 15. The haptic system of claim 12, furthercomprising: a sensor configured to emit a third signal, wherein thefirst processor is further configured to calculate the absolute positioninformation at least partially based on the third signal.
 16. The hapticsystem of claim 12, further comprising: a sensor configured to emit athird signal, wherein the first processor is further configured toreceive a second signal from a second processor; wherein the firstprocessor is further configured to calculate the relative positioninformation at least partially based on the second signal; and whereinthe first processor is further configured to calculate the relativeposition information at least partially based on the third signal. 17.The haptic system of claim 12, wherein the first processor is configuredto send a fourth signal containing force feedback information to theforce sensation generator.
 18. A haptic computer system comprising: acomputer memory storing a first application program and a secondapplication program; means for running the first application programduring a first time period, and the second application during a secondtime period that overlaps with the first time period in a multi-taskingenvironment; a force sensation generator configured to output a firstset of one or more force sensations associated with the firstapplication program, and a second set of one or more force sensationsassociated with the second application program.
 19. A software method ina multi-tasking environment comprising: storing a plurality of data setsin memory, each data set comprising a representation of one or moreforce effects, wherein each one of the plurality of data sets isassociated with one software application; calling an applicationprogramming interface; determining which one of a plurality ofapplication programs is active in the multi-tasking environment; andgenerating a signal representing the data set associated with the activeapplication program.